Skip to content

Commit 47b45c4

Browse files
rikardfalkebornWim Van Sebroeck
authored andcommitted
watchdog: mpc8xxx_wdt: Constify static struct watchdog_ops
The struct mpc8xxx_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 ade448c commit 47b45c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/watchdog/mpc8xxx_wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static struct watchdog_info mpc8xxx_wdt_info = {
118118
.identity = "MPC8xxx",
119119
};
120120

121-
static struct watchdog_ops mpc8xxx_wdt_ops = {
121+
static const struct watchdog_ops mpc8xxx_wdt_ops = {
122122
.owner = THIS_MODULE,
123123
.start = mpc8xxx_wdt_start,
124124
.ping = mpc8xxx_wdt_ping,

0 commit comments

Comments
 (0)