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

media: pci: 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>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent ea9b0f31
...@@ -301,7 +301,7 @@ static u32 cobalt_func(struct i2c_adapter *adap) ...@@ -301,7 +301,7 @@ static u32 cobalt_func(struct i2c_adapter *adap)
} }
/* template for i2c-bit-algo */ /* template for i2c-bit-algo */
static struct i2c_adapter cobalt_i2c_adap_template = { static const struct i2c_adapter cobalt_i2c_adap_template = {
.name = "cobalt i2c driver", .name = "cobalt i2c driver",
.algo = NULL, /* set by i2c-algo-bit */ .algo = NULL, /* set by i2c-algo-bit */
.algo_data = NULL, /* filled from template */ .algo_data = NULL, /* filled from template */
......
...@@ -206,7 +206,7 @@ static int cx18_getsda(void *data) ...@@ -206,7 +206,7 @@ static int cx18_getsda(void *data)
} }
/* template for i2c-bit-algo */ /* template for i2c-bit-algo */
static struct i2c_adapter cx18_i2c_adap_template = { static const struct i2c_adapter cx18_i2c_adap_template = {
.name = "cx18 i2c driver", .name = "cx18 i2c driver",
.algo = NULL, /* set by i2c-algo-bit */ .algo = NULL, /* set by i2c-algo-bit */
.algo_data = NULL, /* filled from template */ .algo_data = NULL, /* filled from template */
......
...@@ -264,7 +264,7 @@ static const struct i2c_algorithm cx23885_i2c_algo_template = { ...@@ -264,7 +264,7 @@ static const struct i2c_algorithm cx23885_i2c_algo_template = {
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
static struct i2c_adapter cx23885_i2c_adap_template = { static const struct i2c_adapter cx23885_i2c_adap_template = {
.name = "cx23885", .name = "cx23885",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.algo = &cx23885_i2c_algo_template, .algo = &cx23885_i2c_algo_template,
......
...@@ -285,7 +285,7 @@ static const struct i2c_algorithm cx25821_i2c_algo_template = { ...@@ -285,7 +285,7 @@ static const struct i2c_algorithm cx25821_i2c_algo_template = {
#endif #endif
}; };
static struct i2c_adapter cx25821_i2c_adap_template = { static const struct i2c_adapter cx25821_i2c_adap_template = {
.name = "cx25821", .name = "cx25821",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.algo = &cx25821_i2c_algo_template, .algo = &cx25821_i2c_algo_template,
......
...@@ -632,7 +632,7 @@ static const struct i2c_algorithm ivtv_algo = { ...@@ -632,7 +632,7 @@ static const struct i2c_algorithm ivtv_algo = {
}; };
/* template for our-bit banger */ /* template for our-bit banger */
static struct i2c_adapter ivtv_i2c_adap_hw_template = { static const struct i2c_adapter ivtv_i2c_adap_hw_template = {
.name = "ivtv i2c driver", .name = "ivtv i2c driver",
.algo = &ivtv_algo, .algo = &ivtv_algo,
.algo_data = NULL, /* filled from template */ .algo_data = NULL, /* filled from template */
...@@ -682,7 +682,7 @@ static int ivtv_getsda_old(void *data) ...@@ -682,7 +682,7 @@ static int ivtv_getsda_old(void *data)
} }
/* template for i2c-bit-algo */ /* template for i2c-bit-algo */
static struct i2c_adapter ivtv_i2c_adap_template = { static const struct i2c_adapter ivtv_i2c_adap_template = {
.name = "ivtv i2c driver", .name = "ivtv i2c driver",
.algo = NULL, /* set by i2c-algo-bit */ .algo = NULL, /* set by i2c-algo-bit */
.algo_data = NULL, /* filled from template */ .algo_data = NULL, /* filled from template */
......
...@@ -300,7 +300,7 @@ static const struct i2c_algorithm netup_i2c_algorithm = { ...@@ -300,7 +300,7 @@ static const struct i2c_algorithm netup_i2c_algorithm = {
.functionality = netup_i2c_func, .functionality = netup_i2c_func,
}; };
static struct i2c_adapter netup_i2c_adapter = { static const struct i2c_adapter netup_i2c_adapter = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = NETUP_UNIDVB_NAME, .name = NETUP_UNIDVB_NAME,
.class = I2C_CLASS_HWMON | I2C_CLASS_SPD, .class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
......
...@@ -339,7 +339,7 @@ static const struct i2c_algorithm saa7134_algo = { ...@@ -339,7 +339,7 @@ static const struct i2c_algorithm saa7134_algo = {
.functionality = functionality, .functionality = functionality,
}; };
static struct i2c_adapter saa7134_adap_template = { static const struct i2c_adapter saa7134_adap_template = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "saa7134", .name = "saa7134",
.algo = &saa7134_algo, .algo = &saa7134_algo,
......
...@@ -78,7 +78,7 @@ static const struct i2c_algorithm saa7164_i2c_algo_template = { ...@@ -78,7 +78,7 @@ static const struct i2c_algorithm saa7164_i2c_algo_template = {
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
static struct i2c_adapter saa7164_i2c_adap_template = { static const struct i2c_adapter saa7164_i2c_adap_template = {
.name = "saa7164", .name = "saa7164",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.algo = &saa7164_i2c_algo_template, .algo = &saa7164_i2c_algo_template,
......
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