Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1471452

[PATCH] watchdog: iTCO_wdt: constify iTCO_wdt_pm structure

From Julia Lawall <Julia.Lawall@lip6.fr>
Newsgroups linux.kernel
Subject [PATCH] watchdog: iTCO_wdt: constify iTCO_wdt_pm structure
Date 2016-08-28 22:50 +0200
Message-ID <sbfbH-6vb-9@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


iTCO_wdt_pm, of type struct dev_pm_ops, is never modified, so declare it as
const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/watchdog/iTCO_wdt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
index 54cab18..06fcb6c 100644
--- a/drivers/watchdog/iTCO_wdt.c
+++ b/drivers/watchdog/iTCO_wdt.c
@@ -629,7 +629,7 @@ static int iTCO_wdt_resume_noirq(struct device *dev)
 	return 0;
 }
 
-static struct dev_pm_ops iTCO_wdt_pm = {
+static const struct dev_pm_ops iTCO_wdt_pm = {
 	.suspend_noirq = iTCO_wdt_suspend_noirq,
 	.resume_noirq = iTCO_wdt_resume_noirq,
 };

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] watchdog: iTCO_wdt: constify iTCO_wdt_pm structure Julia Lawall <Julia.Lawall@lip6.fr> - 2016-08-28 22:50 +0200
  Re: [PATCH] watchdog: iTCO_wdt: constify iTCO_wdt_pm structure Guenter Roeck <linux@roeck-us.net> - 2016-09-09 06:30 +0200

csiph-web