Skip to contentSkip to conversation

pci: make i2c_client const

PATCH New Bhumika Goyal 1 participant 1 message Aug 28, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci: make i2c_client const

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

---
 drivers/media/pci/cx23885/cx23885-i2c.c | 2 +-
 drivers/media/pci/cx25821/cx25821-i2c.c | 2 +-
 drivers/media/pci/ivtv/ivtv-i2c.c       | 2 +-
 drivers/media/pci/saa7134/saa7134-i2c.c | 2 +-
 drivers/media/pci/saa7164/saa7164-i2c.c | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
drivers/media/pci/cx23885/cx23885-i2c.c +1 -1
index 8528032..5bbbdec 100644
@@ -270,7 +270,7 @@ static u32 cx23885_functionality(struct i2c_adapter *adap)
 	.algo              = &cx23885_i2c_algo_template,
 };
 
-static struct i2c_client cx23885_i2c_client_template = {
+static const struct i2c_client cx23885_i2c_client_template = {
 	.name	= "cx23885 internal",
 };
 
drivers/media/pci/cx25821/cx25821-i2c.c +1 -1
index 263a1cf..012e93a 100644
@@ -291,7 +291,7 @@ static u32 cx25821_functionality(struct i2c_adapter *adap)
 	.algo = &cx25821_i2c_algo_template,
 };
 
-static struct i2c_client cx25821_i2c_client_template = {
+static const struct i2c_client cx25821_i2c_client_template = {
 	.name = "cx25821 internal",
 };
 
drivers/media/pci/ivtv/ivtv-i2c.c +1 -1
index 69b4fa6..09f95f1 100644
@@ -700,7 +700,7 @@ static int ivtv_getsda_old(void *data)
 	.timeout	= IVTV_ALGO_BIT_TIMEOUT * HZ,         /* jiffies */
 };
 
-static struct i2c_client ivtv_i2c_client_template = {
+static const struct i2c_client ivtv_i2c_client_template = {
 	.name = "ivtv internal",
 };
 
drivers/media/pci/saa7134/saa7134-i2c.c +1 -1
index 9d0e69e..af94aee 100644
@@ -345,7 +345,7 @@ static u32 functionality(struct i2c_adapter *adap)
 	.algo          = &saa7134_algo,
 };
 
-static struct i2c_client saa7134_client_template = {
+static const struct i2c_client saa7134_client_template = {
 	.name	= "saa7134 internal",
 };
 
drivers/media/pci/saa7164/saa7164-i2c.c +1 -1
index 430f678..e06b617 100644
@@ -84,7 +84,7 @@ static u32 saa7164_functionality(struct i2c_adapter *adap)
 	.algo              = &saa7164_i2c_algo_template,
 };
 
-static struct i2c_client saa7164_i2c_client_template = {
+static const struct i2c_client saa7164_i2c_client_template = {
 	.name	= "saa7164 internal",
 };
 
Signature · 1 line
1.9.1