提交 eb2f255b 编写于 作者: N Nikolaus Schulz 提交者: Guenter Roeck

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: NNikolaus Schulz <mail@microschulz.de>
Cc: stable@kernel.org # 2.6.32+
Signed-off-by: NGuenter Roeck <guenter.roeck@ericsson.com>
上级 a367a1e0
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册