regulator: ltc3589: constify i2c_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Mon, 21 Aug 2017 16:51:08 +0000 (22:21 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 21 Aug 2017 17:10:42 +0000 (18:10 +0100)
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>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/ltc3589.c

index 853a06a..18d5b01 100644 (file)
@@ -539,7 +539,7 @@ static int ltc3589_probe(struct i2c_client *client,
        return 0;
 }
 
-static struct i2c_device_id ltc3589_i2c_id[] = {
+static const struct i2c_device_id ltc3589_i2c_id[] = {
        { "ltc3589",   LTC3589   },
        { "ltc3589-1", LTC3589_1 },
        { "ltc3589-2", LTC3589_2 },