Skip to content

Commit 625e407

Browse files
rikardfalkebornWim Van Sebroeck
authored andcommitted
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 <[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 47b45c4 commit 625e407

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/watchdog/tqmx86_wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static const struct watchdog_info tqmx86_wdt_info = {
6262
.identity = "TQMx86 Watchdog",
6363
};
6464

65-
static struct watchdog_ops tqmx86_wdt_ops = {
65+
static const struct watchdog_ops tqmx86_wdt_ops = {
6666
.owner = THIS_MODULE,
6767
.start = tqmx86_wdt_start,
6868
.set_timeout = tqmx86_wdt_set_timeout,

0 commit comments

Comments
 (0)