* [PATCH] I2C: *write_block* doesn't modify the data - mark as const
@ 2006-06-06 14:41 Krzysztof Halasa
2006-06-06 17:50 ` Jean Delvare
0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Halasa @ 2006-06-06 14:41 UTC (permalink / raw)
To: Jean Delvare; +Cc: linux-kernel, lm-sensors
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>
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -916,6 +916,6 @@ 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;
@@ -947,7 +947,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;
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -94,15 +94,14 @@ extern s32 i2c_smbus_write_byte_data(str
extern s32 i2c_smbus_read_word_data(struct i2c_client * client, u8 command);
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);
+extern s32 i2c_smbus_write_block_data(struct i2c_client * client, u8 command,
+ u8 length, 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] I2C: *write_block* doesn't modify the data - mark as const
2006-06-06 14:41 [PATCH] I2C: *write_block* doesn't modify the data - mark as const Krzysztof Halasa
@ 2006-06-06 17:50 ` Jean Delvare
0 siblings, 0 replies; 2+ messages in thread
From: Jean Delvare @ 2006-06-06 17:50 UTC (permalink / raw)
To: Krzysztof Halasa; +Cc: linux-kernel, lm-sensors
Hi Krzysztof,
> 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>
That's right. Applied, thanks.
--
Jean Delvare
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-06-06 17:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-06 14:41 [PATCH] I2C: *write_block* doesn't modify the data - mark as const Krzysztof Halasa
2006-06-06 17:50 ` Jean Delvare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome