From: Bhumika Goyal Date: Sat, 24 Dec 2016 16:07:32 +0000 (+0530) Subject: watchdog: booke_wdt: add __ro_after_init to booke_wdt_info X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=8d97005e01445921b429e92d7c425a86f76050ab;p=openwrt%2Fstaging%2Fblogic.git watchdog: booke_wdt: add __ro_after_init to booke_wdt_info The object booke_wdt_info of watchdog_info structure is not modified after getting initialized by booke_wdt_init. Apart from getting referenced in init it is also stored in the info field of watchdog_device structure which is of type const struct watchdog_info *info. So, it becomes read only after init and therefore add __ro_after_init to it's declaration. Signed-off-by: Bhumika Goyal Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck --- diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c index 04da4b66c75e..ae034bb1e551 100644 --- a/drivers/watchdog/booke_wdt.c +++ b/drivers/watchdog/booke_wdt.c @@ -192,7 +192,7 @@ static int booke_wdt_set_timeout(struct watchdog_device *wdt_dev, return 0; } -static struct watchdog_info booke_wdt_info = { +static struct watchdog_info booke_wdt_info __ro_after_init = { .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, .identity = "PowerPC Book-E Watchdog", };