mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 06:01:57 +00:00
watchdog: sl28cpld_wdt: Constify static struct watchdog_ops
The struct sl28cpld_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 <rikard.falkeborn@gmail.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20210727223042.48150-2-rikard.falkeborn@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
This commit is contained in:
parent
aec42642d9
commit
ade448c7e5
@ -108,7 +108,7 @@ static const struct watchdog_info sl28cpld_wdt_info = {
|
||||
.identity = "sl28cpld watchdog",
|
||||
};
|
||||
|
||||
static struct watchdog_ops sl28cpld_wdt_ops = {
|
||||
static const struct watchdog_ops sl28cpld_wdt_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.start = sl28cpld_wdt_start,
|
||||
.stop = sl28cpld_wdt_stop,
|
||||
|
Loading…
Reference in New Issue
Block a user