media: ad9389b: constify i2c_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Sat, 19 Aug 2017 19:20:42 +0000 (15:20 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sat, 26 Aug 2017 12:42:12 +0000 (08:42 -0400)
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: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/i2c/ad9389b.c

index 50f354144ee7120fb5145f3a0156604c9508862e..a056d6cdaaaa79bf59298898a6ed226497407d31 100644 (file)
@@ -1208,7 +1208,7 @@ static int ad9389b_remove(struct i2c_client *client)
 
 /* ----------------------------------------------------------------------- */
 
-static struct i2c_device_id ad9389b_id[] = {
+static const struct i2c_device_id ad9389b_id[] = {
        { "ad9389b", 0 },
        { "ad9889b", 0 },
        { }