From: Rikard Falkeborn Date: Tue, 27 Jul 2021 22:30:41 +0000 (+0200) Subject: watchdog: tqmx86: Constify static struct watchdog_ops X-Git-Tag: v5.15-rc1~64^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=625e407ce0e78c82ce19f32710d2996f9ea11449;p=thirdparty%2Fkernel%2Flinux.git watchdog: tqmx86: Constify static struct watchdog_ops The struct tqmx86_wdt_ops is only assigned to the ops pointer in the watchdog_device struct, which is a pointer to const struct watchdog_ops. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210727223042.48150-3-rikard.falkeborn@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck --- diff --git a/drivers/watchdog/tqmx86_wdt.c b/drivers/watchdog/tqmx86_wdt.c index 72d0b0adde388..83860e94ce9d7 100644 --- a/drivers/watchdog/tqmx86_wdt.c +++ b/drivers/watchdog/tqmx86_wdt.c @@ -62,7 +62,7 @@ static const struct watchdog_info tqmx86_wdt_info = { .identity = "TQMx86 Watchdog", }; -static struct watchdog_ops tqmx86_wdt_ops = { +static const struct watchdog_ops tqmx86_wdt_ops = { .owner = THIS_MODULE, .start = tqmx86_wdt_start, .set_timeout = tqmx86_wdt_set_timeout,