]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
media: adv7511: constify i2c_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Sat, 19 Aug 2017 19:20:43 +0000 (15:20 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sat, 26 Aug 2017 12:42:28 +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/adv7511.c

index aef02c994df9df4b0b7d181981972326c08de589..2817bafc67bf37c60bb2e600a8d26bae61a7efb9 100644 (file)
@@ -1985,7 +1985,7 @@ static int adv7511_remove(struct i2c_client *client)
 
 /* ----------------------------------------------------------------------- */
 
-static struct i2c_device_id adv7511_id[] = {
+static const struct i2c_device_id adv7511_id[] = {
        { "adv7511", 0 },
        { }
 };