Skip to contentSkip to conversation

i2c: Mark block write buffers as

PATCH New Greg KH 1 participant 1 message Jun 22, 2006 I2C

lore
Share & tools
lore

Greg KH

author
#0 lore raw

PATCH 31/44 i2c: Mark block write buffers as

From: Krzysztof Halasa <khc at pm.waw.pl>

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 at pm.waw.pl>
Signed-off-by Jean Delvare <khali at linux-fr.org>
Signed-off-by Greg Kroah-Hartman <gregkh at suse.de>
---
 drivers/i2c/i2c-core.c |    4 ++--
 include/linux/i2c.h    |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/i2c/i2c-core.c +2 -2
index 45e2cdf..a45155f 100644
@@ -916,7 +916,7 @@ s32 i2c_smbus_write_word_data(struct i2c
 }
 
 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;
 
@@ -944,7 +944,7 @@ s32 i2c_smbus_read_i2c_block_data(struct
 }
 
 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;
 
include/linux/i2c.h +2 -2
index 0510430..526ddc8 100644
@@ -97,13 +97,13 @@ extern s32 i2c_smbus_write_word_data(str
                                      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
Signature · 1 line
1.4.0