summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolaus Schulz <schulz@macnetix.de>2012-02-08 18:56:10 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-20 12:46:16 -0800
commit82546bf5ccd28a6c5f0829f43d3d5050065ce4d4 (patch)
tree8d4d59302860a2cbc4b20dc248e583b28c0aaee7
parent39141a87c717403c9dd4e0432766ea18054f86f8 (diff)
hwmon: (f75375s) Fix bit shifting in f75375_write16
commit eb2f255b2d360df3f500042a2258dcf2fcbe89a2 upstream. 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 <mail@microschulz.de> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/hwmon/f75375s.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c
index 95cbfb3a7077..dcfd9e1ff0e0 100644
--- a/drivers/hwmon/f75375s.c
+++ b/drivers/hwmon/f75375s.c
@@ -159,7 +159,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));