Hello List Members,
I was asked to post this patch here.
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.
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;
Roman
--
Roman Fietze Telemotive AG Buero Muehlhausen
Breitwiesen 73347 Muehlhausen
Tel.: +49(0)7335/18493-45 http://www.telemotive.de
--
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