[lm-sensors] Const buffers for SMBus/I2C block write functions

Roman Fietze roman.fietze at telemotive.de
Mon Nov 15 15:14:18 CET 2010


Hello List,

Wouldn't it help in some places, when the block write functions would
take a const buffer pointer?

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



More information about the lm-sensors mailing list