diff options
author | Nikolaus Schulz <schulz@macnetix.de> | 2012-02-08 12:56:10 -0500 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2012-02-08 23:47:34 -0500 |
commit | eb2f255b2d360df3f500042a2258dcf2fcbe89a2 (patch) | |
tree | f8a69f2bf4420c608fedfa99af6f6dc083f35154 /drivers/hwmon/f75375s.c | |
parent | a367a1e08b21e995c7112ff32b5efc97d104d405 (diff) |
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 <mail@microschulz.de>
Cc: stable@kernel.org # 2.6.32+
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon/f75375s.c')
-rw-r--r-- | 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 b3eef4474a98..0aabaaf359ac 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, | |||
172 | static inline void f75375_write16(struct i2c_client *client, u8 reg, | 172 | static inline void f75375_write16(struct i2c_client *client, u8 reg, |
173 | u16 value) | 173 | u16 value) |
174 | { | 174 | { |
175 | int err = i2c_smbus_write_byte_data(client, reg, (value << 8)); | 175 | int err = i2c_smbus_write_byte_data(client, reg, (value >> 8)); |
176 | if (err) | 176 | if (err) |
177 | return; | 177 | return; |
178 | i2c_smbus_write_byte_data(client, reg + 1, (value & 0xFF)); | 178 | i2c_smbus_write_byte_data(client, reg + 1, (value & 0xFF)); |