Skip to contentSkip to conversation

increase size of buffer in

PATCH New Hideki IWAMOTO 2 participants 2 messages Sep 22, 2005 – Sep 24, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 increase size of buffer in

One more byte is needed for PEC.

Index: kernel/i2c-core.c
=================================RCS file: /home/cvs/i2c/kernel/i2c-core.c,v retrieving revision 1.110

i2c-core.c +1 -1
diff -u -r1.110 i2c-core.c
@@ -1216,7 +1216,7 @@
 	  need to use only one message; when reading, we need two. We initialize
 	  most things with sane defaults, to keep the code below somewhat
 	  simpler. */
-	unsigned char msgbuf0[I2C_SMBUS_BLOCK_MAX+2];
+	unsigned char msgbuf0[I2C_SMBUS_BLOCK_MAX+3];
 	unsigned char msgbuf1[I2C_SMBUS_BLOCK_MAX+2];
 	int num = read_write = I2C_SMBUS_READ?2:1;
 	struct i2c_msg msg[2] = { { addr, flags, 1, msgbuf0 }, 

----
Hideki IWAMOTO [email protected]

#1 lore raw

PATCH 1/1 increase size of buffer in

Konbanwa Hideki,

Quoted 1 line

One more byte is needed for PEC.

This is correct, I will commit your fix to i2c CVS and will prepare a similar fix for Linux 2.6.

Arigato!

Signature · 1 line
Jean Delvare