Skip to contentSkip to conversation

drivers: make i2c_adapter const

PATCH Applied Bhumika Goyal 4 participants 11 messages Aug 19, 2017 – Aug 29, 2017

Subsystems (15)
lore
Share & tools
lore
#1 lore raw

PATCH 1/4 i2c: busses: make i2c_adapter const

In reply to Bhumika Goyal

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

---
 drivers/i2c/busses/i2c-kempld.c          | 2 +-
 drivers/i2c/busses/i2c-ocores.c          | 2 +-
 drivers/i2c/busses/i2c-octeon-platdrv.c  | 2 +-
 drivers/i2c/busses/i2c-thunderx-pcidrv.c | 2 +-
 drivers/i2c/busses/i2c-xiic.c            | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
drivers/i2c/busses/i2c-kempld.c +1 -1
index 25993d2..e879190 100644
@@ -289,7 +289,7 @@ static u32 kempld_i2c_func(struct i2c_adapter *adap)
 	.functionality	= kempld_i2c_func,
 };
 
-static struct i2c_adapter kempld_i2c_adapter = {
+static const struct i2c_adapter kempld_i2c_adapter = {
 	.owner		= THIS_MODULE,
 	.name		= "i2c-kempld",
 	.class		= I2C_CLASS_HWMON | I2C_CLASS_SPD,
drivers/i2c/busses/i2c-ocores.c +1 -1
index 34f1889..8c42ca7 100644
@@ -276,7 +276,7 @@ static u32 ocores_func(struct i2c_adapter *adap)
 	.functionality = ocores_func,
 };
 
-static struct i2c_adapter ocores_adapter = {
+static const struct i2c_adapter ocores_adapter = {
 	.owner = THIS_MODULE,
 	.name = "i2c-ocores",
 	.class = I2C_CLASS_DEPRECATED,
drivers/i2c/busses/i2c-octeon-platdrv.c +1 -1
index 917524c..64bda83 100644
@@ -126,7 +126,7 @@ static u32 octeon_i2c_functionality(struct i2c_adapter *adap)
 	.functionality = octeon_i2c_functionality,
 };
 
-static struct i2c_adapter octeon_i2c_ops = {
+static const struct i2c_adapter octeon_i2c_ops = {
 	.owner = THIS_MODULE,
 	.name = "OCTEON adapter",
 	.algo = &octeon_i2c_algo,
drivers/i2c/busses/i2c-thunderx-pcidrv.c +1 -1
index ea35a895..df0976f 100644
@@ -75,7 +75,7 @@ static u32 thunderx_i2c_functionality(struct i2c_adapter *adap)
 	.functionality = thunderx_i2c_functionality,
 };
 
-static struct i2c_adapter thunderx_i2c_ops = {
+static const struct i2c_adapter thunderx_i2c_ops = {
 	.owner	= THIS_MODULE,
 	.name	= "ThunderX adapter",
 	.algo	= &thunderx_i2c_algo,
drivers/i2c/busses/i2c-xiic.c +1 -1
index 34b27bf..ae6ed25 100644
@@ -721,7 +721,7 @@ static u32 xiic_func(struct i2c_adapter *adap)
 	.functionality = xiic_func,
 };
 
-static struct i2c_adapter xiic_adapter = {
+static const struct i2c_adapter xiic_adapter = {
 	.owner = THIS_MODULE,
 	.name = DRIVER_NAME,
 	.class = I2C_CLASS_DEPRECATED,
Signature · 1 line
1.9.1
#4 lore raw

PATCH 2/4 media: pci: make i2c_adapter const

In reply to Bhumika Goyal

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

---
 drivers/media/pci/cobalt/cobalt-i2c.c             | 2 +-
 drivers/media/pci/cx18/cx18-i2c.c                 | 2 +-
 drivers/media/pci/cx23885/cx23885-i2c.c           | 2 +-
 drivers/media/pci/cx25821/cx25821-i2c.c           | 2 +-
 drivers/media/pci/ivtv/ivtv-i2c.c                 | 4 ++--
 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c | 2 +-
 drivers/media/pci/saa7134/saa7134-i2c.c           | 2 +-
 drivers/media/pci/saa7164/saa7164-i2c.c           | 2 +-
 8 files changed, 9 insertions(+), 9 deletions(-)
drivers/media/pci/cobalt/cobalt-i2c.c +1 -1
index ad16b89..1a5c556 100644
@@ -301,7 +301,7 @@ static u32 cobalt_func(struct i2c_adapter *adap)
 }
 
 /* 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",
 	.algo = NULL,                   /* set by i2c-algo-bit */
 	.algo_data = NULL,              /* filled from template */
drivers/media/pci/cx18/cx18-i2c.c +1 -1
index eabdd4c..2eb62b2 100644
@@ -206,7 +206,7 @@ static int cx18_getsda(void *data)
 }
 
 /* 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",
 	.algo = NULL,                   /* set by i2c-algo-bit */
 	.algo_data = NULL,              /* filled from template */
drivers/media/pci/cx23885/cx23885-i2c.c +1 -1
index 8528032..0f21467 100644
@@ -264,7 +264,7 @@ static u32 cx23885_functionality(struct i2c_adapter *adap)
 
 /* ----------------------------------------------------------------------- */
 
-static struct i2c_adapter cx23885_i2c_adap_template = {
+static const struct i2c_adapter cx23885_i2c_adap_template = {
 	.name              = "cx23885",
 	.owner             = THIS_MODULE,
 	.algo              = &cx23885_i2c_algo_template,
drivers/media/pci/cx25821/cx25821-i2c.c +1 -1
index 263a1cf..000049d 100644
@@ -285,7 +285,7 @@ static u32 cx25821_functionality(struct i2c_adapter *adap)
 #endif
 };
 
-static struct i2c_adapter cx25821_i2c_adap_template = {
+static const struct i2c_adapter cx25821_i2c_adap_template = {
 	.name = "cx25821",
 	.owner = THIS_MODULE,
 	.algo = &cx25821_i2c_algo_template,
drivers/media/pci/ivtv/ivtv-i2c.c +2 -2
index dea80ef..1ef6c72 100644
@@ -632,7 +632,7 @@ static u32 ivtv_functionality(struct i2c_adapter *adap)
 };
 
 /* 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",
 	.algo = &ivtv_algo,
 	.algo_data = NULL,			/* filled from template */
@@ -682,7 +682,7 @@ static int ivtv_getsda_old(void *data)
 }
 
 /* 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",
 	.algo = NULL,                   /* set by i2c-algo-bit */
 	.algo_data = NULL,              /* filled from template */
drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c +1 -1
index b49e4f9..b13e319 100644
@@ -300,7 +300,7 @@ static u32 netup_i2c_func(struct i2c_adapter *adap)
 	.functionality	= netup_i2c_func,
 };
 
-static struct i2c_adapter netup_i2c_adapter = {
+static const struct i2c_adapter netup_i2c_adapter = {
 	.owner		= THIS_MODULE,
 	.name		= NETUP_UNIDVB_NAME,
 	.class		= I2C_CLASS_HWMON | I2C_CLASS_SPD,
drivers/media/pci/saa7134/saa7134-i2c.c +1 -1
index 9d0e69e..8f2ed63 100644
@@ -339,7 +339,7 @@ static u32 functionality(struct i2c_adapter *adap)
 	.functionality = functionality,
 };
 
-static struct i2c_adapter saa7134_adap_template = {
+static const struct i2c_adapter saa7134_adap_template = {
 	.owner         = THIS_MODULE,
 	.name          = "saa7134",
 	.algo          = &saa7134_algo,
drivers/media/pci/saa7164/saa7164-i2c.c +1 -1
index 430f678..4bcde7c 100644
@@ -78,7 +78,7 @@ static u32 saa7164_functionality(struct i2c_adapter *adap)
 
 /* ----------------------------------------------------------------------- */
 
-static struct i2c_adapter saa7164_i2c_adap_template = {
+static const struct i2c_adapter saa7164_i2c_adap_template = {
 	.name              = "saa7164",
 	.owner             = THIS_MODULE,
 	.algo              = &saa7164_i2c_algo_template,
Signature · 1 line
1.9.1
#6 lore raw

PATCH 3/4 radio-usb-si4713: make i2c_adapter const

In reply to Bhumika Goyal

Make this const as it is only used in a copy operation. Done using Coccinelle

---
 drivers/media/radio/si4713/radio-usb-si4713.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/radio/si4713/radio-usb-si4713.c +1 -1
index e5e5a16..f20aac2 100644
@@ -409,7 +409,7 @@ static u32 si4713_functionality(struct i2c_adapter *adapter)
 
 /* This name value shows up in the sysfs filename associated
 		with this I2C adapter */
-static struct i2c_adapter si4713_i2c_adapter_template = {
+static const struct i2c_adapter si4713_i2c_adapter_template = {
 	.name   = "si4713-i2c",
 	.owner  = THIS_MODULE,
 	.algo   = &si4713_algo,
Signature · 1 line
1.9.1
#8 lore raw

PATCH 4/4 usb: make i2c_adapter const

In reply to Bhumika Goyal

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

---
 drivers/media/usb/au0828/au0828-i2c.c        | 2 +-
 drivers/media/usb/cx231xx/cx231xx-i2c.c      | 2 +-
 drivers/media/usb/em28xx/em28xx-i2c.c        | 2 +-
 drivers/media/usb/hdpvr/hdpvr-i2c.c          | 2 +-
 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c | 2 +-
 drivers/media/usb/stk1160/stk1160-i2c.c      | 2 +-
 drivers/media/usb/usbvision/usbvision-i2c.c  | 4 ++--
 7 files changed, 8 insertions(+), 8 deletions(-)
drivers/media/usb/au0828/au0828-i2c.c +1 -1
index 42b352b..9074a98 100644
@@ -336,7 +336,7 @@ static u32 au0828_functionality(struct i2c_adapter *adap)
 
 /* ----------------------------------------------------------------------- */
 
-static struct i2c_adapter au0828_i2c_adap_template = {
+static const struct i2c_adapter au0828_i2c_adap_template = {
 	.name              = KBUILD_MODNAME,
 	.owner             = THIS_MODULE,
 	.algo              = &au0828_i2c_algo_template,
drivers/media/usb/cx231xx/cx231xx-i2c.c +1 -1
index 8ce6b81..23648da 100644
@@ -459,7 +459,7 @@ static u32 functionality(struct i2c_adapter *adap)
 	.functionality = functionality,
 };
 
-static struct i2c_adapter cx231xx_adap_template = {
+static const struct i2c_adapter cx231xx_adap_template = {
 	.owner = THIS_MODULE,
 	.name = "cx231xx",
 	.algo = &cx231xx_algo,
drivers/media/usb/em28xx/em28xx-i2c.c +1 -1
index 60b195c..66c5012 100644
@@ -876,7 +876,7 @@ static u32 functionality(struct i2c_adapter *i2c_adap)
 	.functionality = functionality,
 };
 
-static struct i2c_adapter em28xx_adap_template = {
+static const struct i2c_adapter em28xx_adap_template = {
 	.owner = THIS_MODULE,
 	.name = "em28xx",
 	.algo = &em28xx_algo,
drivers/media/usb/hdpvr/hdpvr-i2c.c +1 -1
index fcab550..7329310 100644
@@ -184,7 +184,7 @@ static u32 hdpvr_functionality(struct i2c_adapter *adapter)
 	.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",
 	.owner  = THIS_MODULE,
 	.algo   = &hdpvr_algo,
drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c +1 -1
index 20a52b7..3618ace 100644
@@ -519,7 +519,7 @@ static u32 pvr2_i2c_functionality(struct i2c_adapter *adap)
 	.functionality = pvr2_i2c_functionality,
 };
 
-static struct i2c_adapter pvr2_i2c_adap_template = {
+static const struct i2c_adapter pvr2_i2c_adap_template = {
 	.owner         = THIS_MODULE,
 	.class	       = 0,
 };
drivers/media/usb/stk1160/stk1160-i2c.c +1 -1
index 3f2517b..2c70173 100644
@@ -240,7 +240,7 @@ static u32 functionality(struct i2c_adapter *adap)
 	.functionality = functionality,
 };
 
-static struct i2c_adapter adap_template = {
+static const struct i2c_adapter adap_template = {
 	.owner = THIS_MODULE,
 	.name = "stk1160",
 	.algo = &algo,
drivers/media/usb/usbvision/usbvision-i2c.c +2 -2
index 68acafb..837bd4d 100644
@@ -173,7 +173,7 @@ static u32 functionality(struct i2c_adapter *adap)
 /* ----------------------------------------------------------------------- */
 /* 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",
 };
Signature · 1 line
1.9.1
#0 lore raw

cover drivers: make i2c_adapter const

Make i2c_adapter const. Done using Coccinelle.

Bhumika Goyal (4):
i2c: busses: make i2c_adapter const [media] media: pci: make i2c_adapter const [media] radio-usb-si4713: make i2c_adapter const [media] usb: make i2c_adapter const

 drivers/i2c/busses/i2c-kempld.c                   | 2 +-
 drivers/i2c/busses/i2c-ocores.c                   | 2 +-
 drivers/i2c/busses/i2c-octeon-platdrv.c           | 2 +-
 drivers/i2c/busses/i2c-thunderx-pcidrv.c          | 2 +-
 drivers/i2c/busses/i2c-xiic.c                     | 2 +-
 drivers/media/pci/cobalt/cobalt-i2c.c             | 2 +-
 drivers/media/pci/cx18/cx18-i2c.c                 | 2 +-
 drivers/media/pci/cx23885/cx23885-i2c.c           | 2 +-
 drivers/media/pci/cx25821/cx25821-i2c.c           | 2 +-
 drivers/media/pci/ivtv/ivtv-i2c.c                 | 4 ++--
 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c | 2 +-
 drivers/media/pci/saa7134/saa7134-i2c.c           | 2 +-
 drivers/media/pci/saa7164/saa7164-i2c.c           | 2 +-
 drivers/media/radio/si4713/radio-usb-si4713.c     | 2 +-
 drivers/media/usb/au0828/au0828-i2c.c             | 2 +-
 drivers/media/usb/cx231xx/cx231xx-i2c.c           | 2 +-
 drivers/media/usb/em28xx/em28xx-i2c.c             | 2 +-
 drivers/media/usb/hdpvr/hdpvr-i2c.c               | 2 +-
 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c      | 2 +-
 drivers/media/usb/stk1160/stk1160-i2c.c           | 2 +-
 drivers/media/usb/usbvision/usbvision-i2c.c       | 4 ++--
 21 files changed, 23 insertions(+), 23 deletions(-)
Signature · 1 line
1.9.1
Acked-by Mike Isely on v1 4/4
#9 lore raw

Re: [PATCH 4/4] [media] usb: make i2c_adapter const

In reply to Bhumika Goyal
Quoted 115 lines · Bhumika Goyal

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

---
 drivers/media/usb/au0828/au0828-i2c.c        | 2 +-
 drivers/media/usb/cx231xx/cx231xx-i2c.c      | 2 +-
 drivers/media/usb/em28xx/em28xx-i2c.c        | 2 +-
 drivers/media/usb/hdpvr/hdpvr-i2c.c          | 2 +-
 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c | 2 +-
 drivers/media/usb/stk1160/stk1160-i2c.c      | 2 +-
 drivers/media/usb/usbvision/usbvision-i2c.c  | 4 ++--
 7 files changed, 8 insertions(+), 8 deletions(-)
drivers/media/usb/au0828/au0828-i2c.c +1 -1
index 42b352b..9074a98 100644
@@ -336,7 +336,7 @@ static u32 au0828_functionality(struct i2c_adapter *adap)
 
 /* ----------------------------------------------------------------------- */
 
-static struct i2c_adapter au0828_i2c_adap_template = {
+static const struct i2c_adapter au0828_i2c_adap_template = {
 	.name              = KBUILD_MODNAME,
 	.owner             = THIS_MODULE,
 	.algo              = &au0828_i2c_algo_template,
drivers/media/usb/cx231xx/cx231xx-i2c.c +1 -1
index 8ce6b81..23648da 100644
@@ -459,7 +459,7 @@ static u32 functionality(struct i2c_adapter *adap)
 	.functionality = functionality,
 };
 
-static struct i2c_adapter cx231xx_adap_template = {
+static const struct i2c_adapter cx231xx_adap_template = {
 	.owner = THIS_MODULE,
 	.name = "cx231xx",
 	.algo = &cx231xx_algo,
drivers/media/usb/em28xx/em28xx-i2c.c +1 -1
index 60b195c..66c5012 100644
@@ -876,7 +876,7 @@ static u32 functionality(struct i2c_adapter *i2c_adap)
 	.functionality = functionality,
 };
 
-static struct i2c_adapter em28xx_adap_template = {
+static const struct i2c_adapter em28xx_adap_template = {
 	.owner = THIS_MODULE,
 	.name = "em28xx",
 	.algo = &em28xx_algo,
drivers/media/usb/hdpvr/hdpvr-i2c.c +1 -1
index fcab550..7329310 100644
@@ -184,7 +184,7 @@ static u32 hdpvr_functionality(struct i2c_adapter *adapter)
 	.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",
 	.owner  = THIS_MODULE,
 	.algo   = &hdpvr_algo,
drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c +1 -1
index 20a52b7..3618ace 100644
@@ -519,7 +519,7 @@ static u32 pvr2_i2c_functionality(struct i2c_adapter *adap)
 	.functionality = pvr2_i2c_functionality,
 };
 
-static struct i2c_adapter pvr2_i2c_adap_template = {
+static const struct i2c_adapter pvr2_i2c_adap_template = {
 	.owner         = THIS_MODULE,
 	.class	       = 0,
 };
drivers/media/usb/stk1160/stk1160-i2c.c +1 -1
index 3f2517b..2c70173 100644
@@ -240,7 +240,7 @@ static u32 functionality(struct i2c_adapter *adap)
 	.functionality = functionality,
 };
 
-static struct i2c_adapter adap_template = {
+static const struct i2c_adapter adap_template = {
 	.owner = THIS_MODULE,
 	.name = "stk1160",
 	.algo = &algo,
drivers/media/usb/usbvision/usbvision-i2c.c +2 -2
index 68acafb..837bd4d 100644
@@ -173,7 +173,7 @@ static u32 functionality(struct i2c_adapter *adap)
 /* ----------------------------------------------------------------------- */
 /* 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",
 };
Signature · 3 lines
Mike Isely
isely @ isely (dot) net
PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8
Acked-by on v1 1/4
#2 lore raw

Re: [PATCH 1/4] i2c: busses: make i2c_adapter const

In reply to Bhumika Goyal
Quoted 4 lines · Bhumika Goyal

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

i2c-octeon-platdrv.c and i2c-thunderx-pcidrv.c changes:

Thanks.

Quoted 74 lines
---
  drivers/i2c/busses/i2c-kempld.c          | 2 +-
  drivers/i2c/busses/i2c-ocores.c          | 2 +-
  drivers/i2c/busses/i2c-octeon-platdrv.c  | 2 +-
  drivers/i2c/busses/i2c-thunderx-pcidrv.c | 2 +-
  drivers/i2c/busses/i2c-xiic.c            | 2 +-
  5 files changed, 5 insertions(+), 5 deletions(-)
drivers/i2c/busses/i2c-kempld.c +1 -1
index 25993d2..e879190 100644
@@ -289,7 +289,7 @@ static u32 kempld_i2c_func(struct i2c_adapter *adap)
  	.functionality	= kempld_i2c_func,
  };
 
-static struct i2c_adapter kempld_i2c_adapter = {
+static const struct i2c_adapter kempld_i2c_adapter = {
  	.owner		= THIS_MODULE,
  	.name		= "i2c-kempld",
  	.class		= I2C_CLASS_HWMON | I2C_CLASS_SPD,
drivers/i2c/busses/i2c-ocores.c +1 -1
index 34f1889..8c42ca7 100644
@@ -276,7 +276,7 @@ static u32 ocores_func(struct i2c_adapter *adap)
  	.functionality = ocores_func,
  };
 
-static struct i2c_adapter ocores_adapter = {
+static const struct i2c_adapter ocores_adapter = {
  	.owner = THIS_MODULE,
  	.name = "i2c-ocores",
  	.class = I2C_CLASS_DEPRECATED,
drivers/i2c/busses/i2c-octeon-platdrv.c +1 -1
index 917524c..64bda83 100644
@@ -126,7 +126,7 @@ static u32 octeon_i2c_functionality(struct i2c_adapter *adap)
  	.functionality = octeon_i2c_functionality,
  };
 
-static struct i2c_adapter octeon_i2c_ops = {
+static const struct i2c_adapter octeon_i2c_ops = {
  	.owner = THIS_MODULE,
  	.name = "OCTEON adapter",
  	.algo = &octeon_i2c_algo,
drivers/i2c/busses/i2c-thunderx-pcidrv.c +1 -1
index ea35a895..df0976f 100644
@@ -75,7 +75,7 @@ static u32 thunderx_i2c_functionality(struct i2c_adapter *adap)
  	.functionality = thunderx_i2c_functionality,
  };
 
-static struct i2c_adapter thunderx_i2c_ops = {
+static const struct i2c_adapter thunderx_i2c_ops = {
  	.owner	= THIS_MODULE,
  	.name	= "ThunderX adapter",
  	.algo	= &thunderx_i2c_algo,
drivers/i2c/busses/i2c-xiic.c +1 -1
index 34b27bf..ae6ed25 100644
@@ -721,7 +721,7 @@ static u32 xiic_func(struct i2c_adapter *adap)
  	.functionality = xiic_func,
  };
 
-static struct i2c_adapter xiic_adapter = {
+static const struct i2c_adapter xiic_adapter = {
  	.owner = THIS_MODULE,
  	.name = DRIVER_NAME,
  	.class = I2C_CLASS_DEPRECATED,