commit: eb2f255b2d360df3f500042a2258dcf2fcbe89a2 From: Nikolaus Schulz <[email protected]> Date: Wed, 8 Feb 2012 18:56:10 +0100 Subject: hwmon: (f75375s) Fix bit shifting in f75375_write16
In order to extract the high byte of the 16-bit word, shift the word to the right, not to the left. Signed-off-by: Nikolaus Schulz <[email protected]> Cc: [email protected] # 2.6.32+ Signed-off-by: Guenter Roeck <[email protected]> --- drivers/hwmon/f75375s.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c index b3eef44..0aabaaf 100644 --- a/drivers/hwmon/f75375s.c +++ b/drivers/hwmon/f75375s.c @@ -172,7 +172,7 @@ static inline void f75375_write8(struct i2c_client *client, u8 reg, static inline void f75375_write16(struct i2c_client *client, u8 reg, u16 value) { - int err = i2c_smbus_write_byte_data(client, reg, (value << 8)); + int err = i2c_smbus_write_byte_data(client, reg, (value >> 8)); if (err) return; i2c_smbus_write_byte_data(client, reg + 1, (value & 0xFF)); -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
