Commit 46f5ed75 authored by Krzysztof Halasa's avatar Krzysztof Halasa Committed by Greg Kroah-Hartman

[PATCH] i2c: Mark block write buffers as const

The attached patch marks i2c_smbus_write_block_data() and
i2c_smbus_write_i2c_block_data() buffers as const.
Signed-off-by: default avatarKrzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1ded969f
...@@ -916,7 +916,7 @@ s32 i2c_smbus_write_word_data(struct i2c_client *client, u8 command, u16 value) ...@@ -916,7 +916,7 @@ s32 i2c_smbus_write_word_data(struct i2c_client *client, u8 command, u16 value)
} }
s32 i2c_smbus_write_block_data(struct i2c_client *client, u8 command, s32 i2c_smbus_write_block_data(struct i2c_client *client, u8 command,
u8 length, u8 *values) u8 length, const u8 *values)
{ {
union i2c_smbus_data data; union i2c_smbus_data data;
...@@ -944,7 +944,7 @@ s32 i2c_smbus_read_i2c_block_data(struct i2c_client *client, u8 command, u8 *val ...@@ -944,7 +944,7 @@ s32 i2c_smbus_read_i2c_block_data(struct i2c_client *client, u8 command, u8 *val
} }
s32 i2c_smbus_write_i2c_block_data(struct i2c_client *client, u8 command, s32 i2c_smbus_write_i2c_block_data(struct i2c_client *client, u8 command,
u8 length, u8 *values) u8 length, const u8 *values)
{ {
union i2c_smbus_data data; union i2c_smbus_data data;
......
...@@ -97,13 +97,13 @@ extern s32 i2c_smbus_write_word_data(struct i2c_client * client, ...@@ -97,13 +97,13 @@ extern s32 i2c_smbus_write_word_data(struct i2c_client * client,
u8 command, u16 value); u8 command, u16 value);
extern s32 i2c_smbus_write_block_data(struct i2c_client * client, extern s32 i2c_smbus_write_block_data(struct i2c_client * client,
u8 command, u8 length, u8 command, u8 length,
u8 *values); const u8 *values);
/* Returns the number of read bytes */ /* Returns the number of read bytes */
extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client, extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client,
u8 command, u8 *values); u8 command, u8 *values);
extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client, extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client,
u8 command, u8 length, u8 command, u8 length,
u8 *values); const u8 *values);
/* /*
* A driver is capable of handling one or more physical devices present on * A driver is capable of handling one or more physical devices present on
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment