forked from Mirrors/opensbi
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>
This commit is contained in:

committed by
Anup Patel

parent
f067bb84cf
commit
fab0379bb6
@@ -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 },
|
||||
{ },
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user