mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-08 16:11:26 +00:00
(Phil) Fixed a minor bug in smbus_access_i2c which caused an error on
insertion ('memset' not resolved). Namely, I changed this line (near the
very top of the function):
char msgbuf0[33] = { command };
to:
char msgbuf0[33];
[...]
msgbuf0[0] = command;
which should be equivelent (right?? ;').
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@54 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
01e8dc6d7c
commit
15fd94984f
2 files changed
+4
-2
No files matched your search
+2
-1
@@ -101,7 +101,7 @@ s32 smbus_access_i2c(struct i2c_adapter * adapter, u8 addr, char read_write,
|
||||
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. */
|
||||
char msgbuf0[33] = { command };
|
||||
char msgbuf0[33];
|
||||
char msgbuf1[33];
|
||||
int num = read_write == SMBUS_READ?2:1;
|
||||
struct i2c_msg msg[2] = { { addr, 0, 1, msgbuf0 },
|
||||
@@ -109,6 +109,7 @@ s32 smbus_access_i2c(struct i2c_adapter * adapter, u8 addr, char read_write,
|
||||
};
|
||||
int i;
|
||||
|
||||
msgbuf0[0] = command;
|
||||
switch(size) {
|
||||
case SMBUS_QUICK:
|
||||
msg[0].len = 0;
|
||||
|
||||
+2
-1
@@ -101,7 +101,7 @@ s32 smbus_access_i2c(struct i2c_adapter * adapter, u8 addr, char read_write,
|
||||
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. */
|
||||
char msgbuf0[33] = { command };
|
||||
char msgbuf0[33];
|
||||
char msgbuf1[33];
|
||||
int num = read_write == SMBUS_READ?2:1;
|
||||
struct i2c_msg msg[2] = { { addr, 0, 1, msgbuf0 },
|
||||
@@ -109,6 +109,7 @@ s32 smbus_access_i2c(struct i2c_adapter * adapter, u8 addr, char read_write,
|
||||
};
|
||||
int i;
|
||||
|
||||
msgbuf0[0] = command;
|
||||
switch(size) {
|
||||
case SMBUS_QUICK:
|
||||
msg[0].len = 0;
|
||||
|
||||
Reference in new issue
Block a user