diff options
author | Jean Delvare <khali@linux-fr.org> | 2011-01-10 22:11:23 +0100 |
---|---|---|
committer | Jean Delvare <khali@endymion.delvare> | 2011-01-10 22:11:23 +0100 |
commit | 0cc43a1806f078f7fd414850d8f1f1761696e4af (patch) | |
tree | 2278fca3af95002a867fa72b34e4ca97ccf5489f /drivers/rtc | |
parent | af5a60baaee66e2f891dbb9a8519ca28ab7da7cd (diff) | |
download | linux-stable-0cc43a1806f078f7fd414850d8f1f1761696e4af.tar.gz linux-stable-0cc43a1806f078f7fd414850d8f1f1761696e4af.tar.bz2 linux-stable-0cc43a1806f078f7fd414850d8f1f1761696e4af.zip |
i2c: Constify i2c_client where possible
Helper functions for I2C and SMBus transactions don't modify the
i2c_client that is passed to them, so it can be marked const.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-ds1307.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index d827ce570a8c..0d559b6416dd 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -106,9 +106,9 @@ struct ds1307 { struct i2c_client *client; struct rtc_device *rtc; struct work_struct work; - s32 (*read_block_data)(struct i2c_client *client, u8 command, + s32 (*read_block_data)(const struct i2c_client *client, u8 command, u8 length, u8 *values); - s32 (*write_block_data)(struct i2c_client *client, u8 command, + s32 (*write_block_data)(const struct i2c_client *client, u8 command, u8 length, const u8 *values); }; @@ -158,8 +158,8 @@ MODULE_DEVICE_TABLE(i2c, ds1307_id); #define BLOCK_DATA_MAX_TRIES 10 -static s32 ds1307_read_block_data_once(struct i2c_client *client, u8 command, - u8 length, u8 *values) +static s32 ds1307_read_block_data_once(const struct i2c_client *client, + u8 command, u8 length, u8 *values) { s32 i, data; @@ -172,7 +172,7 @@ static s32 ds1307_read_block_data_once(struct i2c_client *client, u8 command, return i; } -static s32 ds1307_read_block_data(struct i2c_client *client, u8 command, +static s32 ds1307_read_block_data(const struct i2c_client *client, u8 command, u8 length, u8 *values) { u8 oldvalues[I2C_SMBUS_BLOCK_MAX]; @@ -198,7 +198,7 @@ static s32 ds1307_read_block_data(struct i2c_client *client, u8 command, return length; } -static s32 ds1307_write_block_data(struct i2c_client *client, u8 command, +static s32 ds1307_write_block_data(const struct i2c_client *client, u8 command, u8 length, const u8 *values) { u8 currvalues[I2C_SMBUS_BLOCK_MAX]; |