summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/usbvision
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-08-19 06:34:15 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-08-26 08:41:58 -0400
commit6843868fd092406b544064e4db1ca902af13cf48 (patch)
treee211ed6751864ebcacebbe878f4fd4a91a790185 /drivers/media/usb/usbvision
parent9a5c43b3d22f17125044f17256a125d2bd13559d (diff)
downloadlinux-stable-6843868fd092406b544064e4db1ca902af13cf48.tar.gz
linux-stable-6843868fd092406b544064e4db1ca902af13cf48.tar.bz2
linux-stable-6843868fd092406b544064e4db1ca902af13cf48.zip
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>
Diffstat (limited to 'drivers/media/usb/usbvision')
-rw-r--r--drivers/media/usb/usbvision/usbvision-i2c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/usb/usbvision/usbvision-i2c.c b/drivers/media/usb/usbvision/usbvision-i2c.c
index 68acafb6bb95..837bd4d9db41 100644
--- a/drivers/media/usb/usbvision/usbvision-i2c.c
+++ b/drivers/media/usb/usbvision/usbvision-i2c.c
@@ -173,7 +173,7 @@ static const struct i2c_algorithm usbvision_algo = {
/* ----------------------------------------------------------------------- */
/* usbvision specific I2C functions */
/* ----------------------------------------------------------------------- */
-static struct i2c_adapter i2c_adap_template;
+static const struct i2c_adapter i2c_adap_template;
int usbvision_i2c_register(struct usb_usbvision *usbvision)
{
@@ -441,7 +441,7 @@ static int usbvision_i2c_read(struct usb_usbvision *usbvision, unsigned char add
return rdcount;
}
-static struct i2c_adapter i2c_adap_template = {
+static const struct i2c_adapter i2c_adap_template = {
.owner = THIS_MODULE,
.name = "usbvision",
};