mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
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>
This commit is contained in:
parent
a367a1e08b
commit
eb2f255b2d
1 changed files with 1 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue