projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a367a1e
)
hwmon: (f75375s) Fix bit shifting in f75375_write16
author
Nikolaus Schulz
<
[email protected]
>
Wed, 8 Feb 2012 17:56:10 +0000
(18:56 +0100)
committer
Guenter Roeck
<
[email protected]
>
Thu, 9 Feb 2012 04:47:34 +0000
(20:47 -0800)
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
patch
|
blob
|
history
diff --git
a/drivers/hwmon/f75375s.c
b/drivers/hwmon/f75375s.c
index b3eef4474a98ee4690571027cd4f1b9a8d060b60..0aabaaf359ac0fb5c6f1731f79630da240aac87d 100644
(file)
--- 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));