media: usb: make i2c_algorithm const
authorBhumika Goyal <bhumirks@gmail.com>
Fri, 18 Aug 2017 16:06:58 +0000 (12:06 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sat, 26 Aug 2017 12:40:01 +0000 (08:40 -0400)
Make these const as they are only used in a copy operation or
are stored in the algo field of i2c_adapter structure, which is const.

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/pvrusb2/pvrusb2-i2c-core.c

index 42b352bb4f020523f7c3a9e284217d36b411b3ea..a028e3682d1cac87835ccb92746ba1b93317387a 100644 (file)
@@ -329,7 +329,7 @@ static u32 au0828_functionality(struct i2c_adapter *adap)
        return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_I2C;
 }
 
-static struct i2c_algorithm au0828_i2c_algo_template = {
+static const struct i2c_algorithm au0828_i2c_algo_template = {
        .master_xfer    = i2c_xfer,
        .functionality  = au0828_functionality,
 };
index e3c8f9414e45be4c344ae4bf08e342235678861e..694dc75ce89bc1fd16053be89ec9ea321e1ce4a9 100644 (file)
@@ -514,7 +514,7 @@ static u32 pvr2_i2c_functionality(struct i2c_adapter *adap)
        return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_I2C;
 }
 
-static struct i2c_algorithm pvr2_i2c_algo_template = {
+static const struct i2c_algorithm pvr2_i2c_algo_template = {
        .master_xfer   = pvr2_i2c_xfer,
        .functionality = pvr2_i2c_functionality,
 };