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

index 1bf6129fab62d486968fddde4423a9e452dd4716..65f34e7e146f25aa928cd57799bf3b6280a7d7d8 100644 (file)
@@ -3607,7 +3607,7 @@ static int adv7842_remove(struct i2c_client *client)
 
 /* ----------------------------------------------------------------------- */
 
-static struct i2c_device_id adv7842_id[] = {
+static const struct i2c_device_id adv7842_id[] = {
        { "adv7842", 0 },
        { }
 };