diff options
author | Samuel Holland <samuel@sholland.org> | 2022-05-29 21:32:11 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2022-05-30 08:02:35 +0300 |
commit | fab0379bb60d6e177018b53f07718b69ba34948d (patch) | |
tree | 780d1bdbb8ea444a227e7a3b9c1972014b92404b /lib/utils/reset | |
parent | f067bb84cf2dd6493ff3fa49294d3ec80481ad75 (diff) | |
download | opensbi-fab0379bb60d6e177018b53f07718b69ba34948d.tar.xz |
lib: utils/fdt: Require match data to be const
Match data stores hardware attributes which do not change at runtime, so
it does not need to be mutable. Make it const.
Reviewed-by: Guo Ren <guoren@kernel.org>
Reviewed-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'lib/utils/reset')
-rw-r--r-- | lib/utils/reset/fdt_reset_gpio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/utils/reset/fdt_reset_gpio.c b/lib/utils/reset/fdt_reset_gpio.c index d28b6f5..bd2c622 100644 --- a/lib/utils/reset/fdt_reset_gpio.c +++ b/lib/utils/reset/fdt_reset_gpio.c @@ -149,7 +149,7 @@ static int gpio_reset_init(void *fdt, int nodeoff, } static const struct fdt_match gpio_poweroff_match[] = { - { .compatible = "gpio-poweroff", .data = (void *)FALSE }, + { .compatible = "gpio-poweroff", .data = (const void *)FALSE }, { }, }; @@ -159,7 +159,7 @@ struct fdt_reset fdt_poweroff_gpio = { }; static const struct fdt_match gpio_reset_match[] = { - { .compatible = "gpio-restart", .data = (void *)TRUE }, + { .compatible = "gpio-restart", .data = (const void *)TRUE }, { }, }; |