Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: usb: make i2c_adapter const

Make these const as they are only used in a copy operation.
Done using Coccinelle

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

authored by

Bhumika Goyal and committed by
Mauro Carvalho Chehab
6843868f 9a5c43b3

+8 -8
+1 -1
drivers/media/usb/au0828/au0828-i2c.c
··· 336 336 337 337 /* ----------------------------------------------------------------------- */ 338 338 339 - static struct i2c_adapter au0828_i2c_adap_template = { 339 + static const struct i2c_adapter au0828_i2c_adap_template = { 340 340 .name = KBUILD_MODNAME, 341 341 .owner = THIS_MODULE, 342 342 .algo = &au0828_i2c_algo_template,
+1 -1
drivers/media/usb/cx231xx/cx231xx-i2c.c
··· 459 459 .functionality = functionality, 460 460 }; 461 461 462 - static struct i2c_adapter cx231xx_adap_template = { 462 + static const struct i2c_adapter cx231xx_adap_template = { 463 463 .owner = THIS_MODULE, 464 464 .name = "cx231xx", 465 465 .algo = &cx231xx_algo,
+1 -1
drivers/media/usb/em28xx/em28xx-i2c.c
··· 876 876 .functionality = functionality, 877 877 }; 878 878 879 - static struct i2c_adapter em28xx_adap_template = { 879 + static const struct i2c_adapter em28xx_adap_template = { 880 880 .owner = THIS_MODULE, 881 881 .name = "em28xx", 882 882 .algo = &em28xx_algo,
+1 -1
drivers/media/usb/hdpvr/hdpvr-i2c.c
··· 185 185 .functionality = hdpvr_functionality, 186 186 }; 187 187 188 - static struct i2c_adapter hdpvr_i2c_adapter_template = { 188 + static const struct i2c_adapter hdpvr_i2c_adapter_template = { 189 189 .name = "Hauppage HD PVR I2C", 190 190 .owner = THIS_MODULE, 191 191 .algo = &hdpvr_algo,
+1 -1
drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c
··· 519 519 .functionality = pvr2_i2c_functionality, 520 520 }; 521 521 522 - static struct i2c_adapter pvr2_i2c_adap_template = { 522 + static const struct i2c_adapter pvr2_i2c_adap_template = { 523 523 .owner = THIS_MODULE, 524 524 .class = 0, 525 525 };
+1 -1
drivers/media/usb/stk1160/stk1160-i2c.c
··· 240 240 .functionality = functionality, 241 241 }; 242 242 243 - static struct i2c_adapter adap_template = { 243 + static const struct i2c_adapter adap_template = { 244 244 .owner = THIS_MODULE, 245 245 .name = "stk1160", 246 246 .algo = &algo,
+2 -2
drivers/media/usb/usbvision/usbvision-i2c.c
··· 173 173 /* ----------------------------------------------------------------------- */ 174 174 /* usbvision specific I2C functions */ 175 175 /* ----------------------------------------------------------------------- */ 176 - static struct i2c_adapter i2c_adap_template; 176 + static const struct i2c_adapter i2c_adap_template; 177 177 178 178 int usbvision_i2c_register(struct usb_usbvision *usbvision) 179 179 { ··· 441 441 return rdcount; 442 442 } 443 443 444 - static struct i2c_adapter i2c_adap_template = { 444 + static const struct i2c_adapter i2c_adap_template = { 445 445 .owner = THIS_MODULE, 446 446 .name = "usbvision", 447 447 };