Skip to content

Commit ade448c

Browse files
rikardfalkebornWim Van Sebroeck
authored andcommitted
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 <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent aec4264 commit ade448c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/watchdog/sl28cpld_wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ static const struct watchdog_info sl28cpld_wdt_info = {
108108
.identity = "sl28cpld watchdog",
109109
};
110110

111-
static struct watchdog_ops sl28cpld_wdt_ops = {
111+
static const struct watchdog_ops sl28cpld_wdt_ops = {
112112
.owner = THIS_MODULE,
113113
.start = sl28cpld_wdt_start,
114114
.stop = sl28cpld_wdt_stop,

0 commit comments

Comments
 (0)