drivers: make i2c_adapter const
Subsystems (15)
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
PATCH 1/4 i2c: busses: make i2c_adapter const
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
Re: [PATCH 1/4] i2c: busses: make i2c_adapter const
Quoted 4 lines · Bhumika Goyal
Make these const as they are only used in a copy operation. Done using Coccinelle.
Signed-off-by Bhumika Goyal <[email protected]>
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@@ -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@@ -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@@ -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@@ -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@@ -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 ,
Wolfram Sang
AppliedRe: [PATCH 1/4] i2c: busses: make i2c_adapter const
In reply to Bhumika GoyalQuoted 4 lines · Bhumika Goyal
Make these const as they are only used in a copy operation. Done using Coccinelle.
Signed-off-by Bhumika Goyal <[email protected]>
Applied to for-next, thanks!
PATCH 2/4 media: pci: make i2c_adapter const
In reply to Bhumika GoyalMake 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
Re: [PATCH 2/4] [media] media: pci: make i2c_adapter const
Quoted 4 lines · Bhumika Goyal
Make these const as they are only used in a copy operation. Done using Coccinelle
Signed-off-by Bhumika Goyal <[email protected]>
PATCH 3/4 radio-usb-si4713: make i2c_adapter const
In reply to Bhumika GoyalMake 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
@@ -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
Re: [PATCH 3/4] [media] radio-usb-si4713: make i2c_adapter const
Quoted 4 lines · Bhumika Goyal
Make this const as it is only used in a copy operation. Done using Coccinelle
Signed-off-by Bhumika Goyal <[email protected]>
PATCH 4/4 usb: make i2c_adapter const
In reply to Bhumika GoyalMake 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 addreturn 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
Re: [PATCH 4/4] [media] usb: make i2c_adapter const
Quoted 115 lines · Bhumika Goyal
Make these const as they are only used in a copy operation. Done using Coccinelle
Signed-off-by Bhumika Goyal <[email protected]>--- 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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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 addreturn 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
Re: [PATCH 4/4] [media] usb: make i2c_adapter const
In reply to Bhumika GoyalQuoted 4 lines · Bhumika Goyal
Make these const as they are only used in a copy operation. Done using Coccinelle
Signed-off-by Bhumika Goyal <[email protected]>