watchdog: ziirave: constify i2c_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Mon, 21 Aug 2017 16:48:38 +0000 (22:18 +0530)
committerWim Van Sebroeck <wim@iguana.be>
Sat, 9 Sep 2017 19:16:17 +0000 (21:16 +0200)
i2c_device_id are not supposed to change at runtime. All functions
working with i2c_device_id provided by <linux/i2c.h> work with
const i2c_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/ziirave_wdt.c

index b4e0cea5a64eec8c292762d3a390a492e447c282..d3594aa3a3743dea1f67878a38bee4d75d43ce85 100644 (file)
@@ -737,7 +737,7 @@ static int ziirave_wdt_remove(struct i2c_client *client)
        return 0;
 }
 
-static struct i2c_device_id ziirave_wdt_id[] = {
+static const struct i2c_device_id ziirave_wdt_id[] = {
        { "rave-wdt", 0 },
        { }
 };