Hi Roman,
Sorry for the late answer.
On Tue, 16 Nov 2010 06:57:10 +0100, Roman Fietze wrote:
> If the SMBus and I2C block write functions in i2c-dev.h (the version
> from lm-sensors, not the kernel) would take const buffer pointers,
> this would allow callers to use const data to be sent via SMB/I2C.
The lm-sensors package no longer includes the "user-space version" of
i2c-dev. It is part of i2c-tools now.
Note that this file is an horror, BTW. It should be turned into a proper
library, to avoid the confusion with the kernel header file. This is on
my to-do list for year 2011.
> Please see the diff below.
>
>
> Index: include/linux/i2c-dev.h
> ===================================================================
> --- include/linux/i2c-dev.h (revision 5881)
> +++ include/linux/i2c-dev.h (working copy)
> @@ -258,7 +258,7 @@
> }
>
> static inline __s32 i2c_smbus_write_block_data(int file, __u8 command,
> - __u8 length, __u8 *values)
> + __u8 length, const __u8
> *values)
> {
> union i2c_smbus_data data;
> int i;
> @@ -296,7 +296,7 @@
> }
>
> static inline __s32 i2c_smbus_write_i2c_block_data(int file, __u8 command,
> - __u8 length, __u8 *values)
> + __u8 length, const __u8
> *values)
> {
> union i2c_smbus_data data;
> int i;
>
Yes, this makes sense. Patch applied, thanks.
--
Jean Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html