]> err.no Git - linux-2.6/commitdiff
[PATCH] i2c: Mark block write buffers as const
authorKrzysztof Halasa <khc@pm.waw.pl>
Mon, 12 Jun 2006 19:42:20 +0000 (21:42 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 22 Jun 2006 18:10:34 +0000 (11:10 -0700)
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>
drivers/i2c/i2c-core.c
include/linux/i2c.h

index 45e2cdf547367ba3ba33f28eabd3c1d7175c054d..a45155f799d4405dae2d67ca06d7168f64fe9d3d 100644 (file)
@@ -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;
 
@@ -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;
 
index 0510430e00dbc88bcfc045bd4f7463ad32bbcc95..526ddc8eecfbf899b67ad0587fcf573e152d9021 100644 (file)
@@ -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