git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hwmon: (it87) Preserve configuration register bits on init
[pandora-kernel.git]
/
drivers
/
hwmon
/
ad7414.c
diff --git
a/drivers/hwmon/ad7414.c
b/drivers/hwmon/ad7414.c
index
d46c0c7
..
df29a7f
100644
(file)
--- a/
drivers/hwmon/ad7414.c
+++ b/
drivers/hwmon/ad7414.c
@@
-58,10
+58,9
@@
static inline int ad7414_temp_from_reg(s16 reg)
static inline int ad7414_read(struct i2c_client *client, u8 reg)
{
static inline int ad7414_read(struct i2c_client *client, u8 reg)
{
- if (reg == AD7414_REG_TEMP) {
- int value = i2c_smbus_read_word_data(client, reg);
- return (value < 0) ? value : swab16(value);
- } else
+ if (reg == AD7414_REG_TEMP)
+ return i2c_smbus_read_word_swapped(client, reg);
+ else
return i2c_smbus_read_byte_data(client, reg);
}
return i2c_smbus_read_byte_data(client, reg);
}