watchdog: imx2: Constify struct regmap_config and watchdog_ops
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Mon, 5 Jan 2015 09:09:17 +0000 (10:09 +0100)
committerWim Van Sebroeck <wim@iguana.be>
Tue, 17 Feb 2015 20:31:06 +0000 (21:31 +0100)
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>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/imx2_wdt.c

index 5142bbabe0279f0b36c92c854f7daa407e2e32a5..5e6d808d358a5c342ae11b9fd71ce5e09416b809 100644 (file)
@@ -205,7 +205,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,
@@ -213,7 +213,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,