diff options
| author | Bhumika Goyal <bhumirks@gmail.com> | 2017-08-18 12:06:57 -0400 |
|---|---|---|
| committer | Wolfram Sang <wsa@the-dreams.de> | 2017-08-29 16:20:20 -0400 |
| commit | ad3caf8abc385b974d863b7a7a2950f4b089fee8 (patch) | |
| tree | 491b32a489fc560968952689b2a2fd123d52e2b5 | |
| parent | 8b9ec0719834fe66146d138d62ed66cef025c864 (diff) | |
i2c: busses: make i2c_algorithm const
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>
| -rw-r--r-- | drivers/i2c/busses/i2c-pnx.c | 2 | ||||
| -rw-r--r-- | drivers/i2c/busses/i2c-puv3.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c index fd5f9d2bf6d9..42d6b3a226f8 100644 --- a/drivers/i2c/busses/i2c-pnx.c +++ b/drivers/i2c/busses/i2c-pnx.c | |||
| @@ -590,7 +590,7 @@ static u32 i2c_pnx_func(struct i2c_adapter *adapter) | |||
| 590 | return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; | 590 | return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; |
| 591 | } | 591 | } |
| 592 | 592 | ||
| 593 | static struct i2c_algorithm pnx_algorithm = { | 593 | static const struct i2c_algorithm pnx_algorithm = { |
| 594 | .master_xfer = i2c_pnx_xfer, | 594 | .master_xfer = i2c_pnx_xfer, |
| 595 | .functionality = i2c_pnx_func, | 595 | .functionality = i2c_pnx_func, |
| 596 | }; | 596 | }; |
diff --git a/drivers/i2c/busses/i2c-puv3.c b/drivers/i2c/busses/i2c-puv3.c index 0c8b1571886d..287088b8c4c8 100644 --- a/drivers/i2c/busses/i2c-puv3.c +++ b/drivers/i2c/busses/i2c-puv3.c | |||
| @@ -175,7 +175,7 @@ static u32 puv3_i2c_func(struct i2c_adapter *adapter) | |||
| 175 | return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; | 175 | return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; |
| 176 | } | 176 | } |
| 177 | 177 | ||
| 178 | static struct i2c_algorithm puv3_i2c_algorithm = { | 178 | static const struct i2c_algorithm puv3_i2c_algorithm = { |
| 179 | .master_xfer = puv3_i2c_xfer, | 179 | .master_xfer = puv3_i2c_xfer, |
| 180 | .functionality = puv3_i2c_func, | 180 | .functionality = puv3_i2c_func, |
| 181 | }; | 181 | }; |
