Skip to content

Commit

Permalink
[PATCH] i2c: Mark block write buffers as const
Browse files Browse the repository at this point in the history
The attached patch marks i2c_smbus_write_block_data() and
i2c_smbus_write_i2c_block_data() buffers as const.

Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Krzysztof Halasa authored and Greg Kroah-Hartman committed Jun 22, 2006
1 parent 1ded969 commit 46f5ed7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/i2c/i2c-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
u8 length, u8 *values)
u8 length, const u8 *values)
{
union i2c_smbus_data data;

Expand Down Expand Up @@ -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,
u8 length, u8 *values)
u8 length, const u8 *values)
{
union i2c_smbus_data data;

Expand Down
4 changes: 2 additions & 2 deletions include/linux/i2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ extern s32 i2c_smbus_write_word_data(struct i2c_client * client,
u8 command, u16 value);
extern s32 i2c_smbus_write_block_data(struct i2c_client * client,
u8 command, u8 length,
u8 *values);
const u8 *values);
/* Returns the number of read bytes */
extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client,
u8 command, u8 *values);
extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client,
u8 command, u8 length,
u8 *values);
const u8 *values);

/*
* A driver is capable of handling one or more physical devices present on
Expand Down

0 comments on commit 46f5ed7

Please sign in to comment.