]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
media: usb: make i2c_adapter const
authorBhumika Goyal <bhumirks@gmail.com>
Sat, 19 Aug 2017 10:34:15 +0000 (06:34 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sat, 26 Aug 2017 12:41:58 +0000 (08:41 -0400)
Make these const as they are only used in a copy operation.
Done using Coccinelle

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/au0828/au0828-i2c.c
drivers/media/usb/cx231xx/cx231xx-i2c.c
drivers/media/usb/em28xx/em28xx-i2c.c
drivers/media/usb/hdpvr/hdpvr-i2c.c
drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c
drivers/media/usb/stk1160/stk1160-i2c.c
drivers/media/usb/usbvision/usbvision-i2c.c

index a028e3682d1cac87835ccb92746ba1b93317387a..ef7d1b830ca31fe416251427afb34db9ad35fc5b 100644 (file)
@@ -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,
        .owner             = THIS_MODULE,
        .algo              = &au0828_i2c_algo_template,
index 8ce6b815d16db0e31e7fc9a9ca9d5d117d52f91c..23648dab7be84ddf85497ef83d5ce1527831ea08 100644 (file)
@@ -459,7 +459,7 @@ static const struct i2c_algorithm cx231xx_algo = {
        .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,
index 60b195c157b807486bf87aa5a1b6ebd60e9754cc..66c5012a628a61307fea3adb6da7021140b2c970 100644 (file)
@@ -876,7 +876,7 @@ static const struct i2c_algorithm em28xx_algo = {
        .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,
index b9074b978ae37263eca4b876780fdbd4de116128..1db49ed5eaf1a1e84f3a91c6005b0766cd29ba1b 100644 (file)
@@ -185,7 +185,7 @@ static const struct i2c_algorithm hdpvr_algo = {
        .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,
index 694dc75ce89bc1fd16053be89ec9ea321e1ce4a9..ff7b4d1d385d52adf76fd49e70390a13c1af6f2a 100644 (file)
@@ -519,7 +519,7 @@ static const struct i2c_algorithm pvr2_i2c_algo_template = {
        .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,
 };
index 3f2517be02bbad835ae826e900be0435f4d61518..2c70173e3c82b03b707ad035534298fd7ca86ce4 100644 (file)
@@ -240,7 +240,7 @@ static const struct i2c_algorithm algo = {
        .functionality = functionality,
 };
 
-static struct i2c_adapter adap_template = {
+static const struct i2c_adapter adap_template = {
        .owner = THIS_MODULE,
        .name = "stk1160",
        .algo = &algo,
index 68acafb6bb9562f9681e15a84b56184f160e5b9f..837bd4d9db4156d00cc8f9069ea6a4cb0f5ac5af 100644 (file)
@@ -173,7 +173,7 @@ static const struct i2c_algorithm usbvision_algo = {
 /* ----------------------------------------------------------------------- */
 /* 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",
 };