aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRikard Falkeborn <[email protected]>2021-07-28 00:30:42 +0200
committerWim Van Sebroeck <[email protected]>2021-08-22 10:28:10 +0200
commit47b45c4a69febd423ecb011fce22559158cd08d9 (patch)
treec867085b0d757aa49da4d57610ada678d0af67de
parentade448c7e58e58b8fb86ebf31497b68b7c4f94d7 (diff)
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]>
-rw-r--r--drivers/watchdog/mpc8xxx_wdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c
index 2f7ded32e878..1c569be72ea2 100644
--- a/drivers/watchdog/mpc8xxx_wdt.c
+++ b/drivers/watchdog/mpc8xxx_wdt.c
@@ -118,7 +118,7 @@ static struct watchdog_info mpc8xxx_wdt_info = {
.identity = "MPC8xxx",
};
-static struct watchdog_ops mpc8xxx_wdt_ops = {
+static const struct watchdog_ops mpc8xxx_wdt_ops = {
.owner = THIS_MODULE,
.start = mpc8xxx_wdt_start,
.ping = mpc8xxx_wdt_ping,