Commit 6843868f authored by Bhumika Goyal's avatar Bhumika Goyal Committed by Mauro Carvalho Chehab

media: usb: make i2c_adapter const

Make these const as they are only used in a copy operation.
Done using Coccinelle
Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
Acked-by: default avatarMike Isely <isely@pobox.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 9a5c43b3
...@@ -336,7 +336,7 @@ static const struct i2c_algorithm au0828_i2c_algo_template = { ...@@ -336,7 +336,7 @@ static const struct i2c_algorithm au0828_i2c_algo_template = {
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
static struct i2c_adapter au0828_i2c_adap_template = { static const struct i2c_adapter au0828_i2c_adap_template = {
.name = KBUILD_MODNAME, .name = KBUILD_MODNAME,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.algo = &au0828_i2c_algo_template, .algo = &au0828_i2c_algo_template,
......
...@@ -459,7 +459,7 @@ static const struct i2c_algorithm cx231xx_algo = { ...@@ -459,7 +459,7 @@ static const struct i2c_algorithm cx231xx_algo = {
.functionality = functionality, .functionality = functionality,
}; };
static struct i2c_adapter cx231xx_adap_template = { static const struct i2c_adapter cx231xx_adap_template = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "cx231xx", .name = "cx231xx",
.algo = &cx231xx_algo, .algo = &cx231xx_algo,
......
...@@ -876,7 +876,7 @@ static const struct i2c_algorithm em28xx_algo = { ...@@ -876,7 +876,7 @@ static const struct i2c_algorithm em28xx_algo = {
.functionality = functionality, .functionality = functionality,
}; };
static struct i2c_adapter em28xx_adap_template = { static const struct i2c_adapter em28xx_adap_template = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "em28xx", .name = "em28xx",
.algo = &em28xx_algo, .algo = &em28xx_algo,
......
...@@ -185,7 +185,7 @@ static const struct i2c_algorithm hdpvr_algo = { ...@@ -185,7 +185,7 @@ static const struct i2c_algorithm hdpvr_algo = {
.functionality = hdpvr_functionality, .functionality = hdpvr_functionality,
}; };
static struct i2c_adapter hdpvr_i2c_adapter_template = { static const struct i2c_adapter hdpvr_i2c_adapter_template = {
.name = "Hauppage HD PVR I2C", .name = "Hauppage HD PVR I2C",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.algo = &hdpvr_algo, .algo = &hdpvr_algo,
......
...@@ -519,7 +519,7 @@ static const struct i2c_algorithm pvr2_i2c_algo_template = { ...@@ -519,7 +519,7 @@ static const struct i2c_algorithm pvr2_i2c_algo_template = {
.functionality = pvr2_i2c_functionality, .functionality = pvr2_i2c_functionality,
}; };
static struct i2c_adapter pvr2_i2c_adap_template = { static const struct i2c_adapter pvr2_i2c_adap_template = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.class = 0, .class = 0,
}; };
......
...@@ -240,7 +240,7 @@ static const struct i2c_algorithm algo = { ...@@ -240,7 +240,7 @@ static const struct i2c_algorithm algo = {
.functionality = functionality, .functionality = functionality,
}; };
static struct i2c_adapter adap_template = { static const struct i2c_adapter adap_template = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "stk1160", .name = "stk1160",
.algo = &algo, .algo = &algo,
......
...@@ -173,7 +173,7 @@ static const struct i2c_algorithm usbvision_algo = { ...@@ -173,7 +173,7 @@ static const struct i2c_algorithm usbvision_algo = {
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
/* usbvision specific I2C functions */ /* 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) int usbvision_i2c_register(struct usb_usbvision *usbvision)
{ {
...@@ -441,7 +441,7 @@ static int usbvision_i2c_read(struct usb_usbvision *usbvision, unsigned char add ...@@ -441,7 +441,7 @@ static int usbvision_i2c_read(struct usb_usbvision *usbvision, unsigned char add
return rdcount; return rdcount;
} }
static struct i2c_adapter i2c_adap_template = { static const struct i2c_adapter i2c_adap_template = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "usbvision", .name = "usbvision",
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment