]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
i2c: busses: make i2c_algorithm const
authorBhumika Goyal <bhumirks@gmail.com>
Fri, 18 Aug 2017 16:06:57 +0000 (21:36 +0530)
committerWolfram Sang <wsa@the-dreams.de>
Tue, 29 Aug 2017 20:20:20 +0000 (22:20 +0200)
Make these const as they are only stored in the algo field of
i2c_adapter structure, which is const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-pnx.c
drivers/i2c/busses/i2c-puv3.c

index fd5f9d2bf6d94eeaf1340e0ca260ffedcdcb135a..42d6b3a226f858db080f64fdd54470d43e43ef49 100644 (file)
@@ -590,7 +590,7 @@ static u32 i2c_pnx_func(struct i2c_adapter *adapter)
        return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
 }
 
-static struct i2c_algorithm pnx_algorithm = {
+static const struct i2c_algorithm pnx_algorithm = {
        .master_xfer = i2c_pnx_xfer,
        .functionality = i2c_pnx_func,
 };
index 0c8b1571886d5b7e1b8fb7bfedb25eb63d97cfec..287088b8c4c834734a0d6b43924f225c8e4a751e 100644 (file)
@@ -175,7 +175,7 @@ static u32 puv3_i2c_func(struct i2c_adapter *adapter)
        return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
 }
 
-static struct i2c_algorithm puv3_i2c_algorithm = {
+static const struct i2c_algorithm puv3_i2c_algorithm = {
        .master_xfer    = puv3_i2c_xfer,
        .functionality  = puv3_i2c_func,
 };