* [PATCH] watchdog: imx2: Constify struct regmap_config and watchdog_ops
@ 2015-01-05 9:09 Krzysztof Kozlowski
2015-01-13 12:10 ` Guenter Roeck
2015-02-02 22:56 ` Wim Van Sebroeck
0 siblings, 2 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2015-01-05 9:09 UTC (permalink / raw)
To: Wim Van Sebroeck, linux-watchdog, linux-kernel; +Cc: Krzysztof Kozlowski
The regmap_config struct may be const because it is not modified by the
driver and regmap_init() accepts pointer to const. Make struct
watchdog_ops const as well.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
drivers/watchdog/imx2_wdt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index d6add516a7a7..bdb4dc1a2ee2 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -203,7 +203,7 @@ static inline void imx2_wdt_ping_if_active(struct watchdog_device *wdog)
}
}
-static struct watchdog_ops imx2_wdt_ops = {
+static const struct watchdog_ops imx2_wdt_ops = {
.owner = THIS_MODULE,
.start = imx2_wdt_start,
.stop = imx2_wdt_stop,
@@ -211,7 +211,7 @@ static struct watchdog_ops imx2_wdt_ops = {
.set_timeout = imx2_wdt_set_timeout,
};
-static struct regmap_config imx2_wdt_regmap_config = {
+static const struct regmap_config imx2_wdt_regmap_config = {
.reg_bits = 16,
.reg_stride = 2,
.val_bits = 16,
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-02 22:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-05 9:09 [PATCH] watchdog: imx2: Constify struct regmap_config and watchdog_ops Krzysztof Kozlowski
2015-01-13 12:10 ` Guenter Roeck
2015-02-02 22:56 ` Wim Van Sebroeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox