On Tue, 13 Apr 2004 22:56:51 +0400 Evgeniy Polyakov <johnpol at 2ka.mipt.ru> wrote: > @@ -126,7 +126,7 @@ > if (tmp < 0) return (-EIO); > > /* convert the data to little endian format */ > - *value = swab16((u16) tmp); > + *value = ((u16) tmp >> 8) | (u16) ((u16) tmp << 8); > > return (0); > } > @@ -134,10 +134,8 @@ > static inline int lm92_write16 (struct i2c_client *client,u8 reg,u16 > value){ > /* convert the data to big endian format */ > - if (i2c_smbus_write_word_data(client, reg, swab16(value)) < 0) > - return -EIO; > - > - return 0; > + u16 be = (value >> 8) | (u16) (value << 8); > + return (i2c_smbus_write_word_data (client,reg,be) < 0 ? -EIO : > 0); > } > > static int lm92_read (struct i2c_client *client) This part is bogus. Please review attached patch instead. Evgeniy Polyakov ( s0mbre ) Only failure makes us experts. -- Theo de Raadt -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: lm92.c.diff Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040413/1ecf9557/attachment.pl