summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorPhil Reid <preid@electromag.com.au>2017-06-15 21:59:30 +0800
committerSebastian Reichel <sebastian.reichel@collabora.co.uk>2017-06-15 16:47:35 +0200
commit48f680c0a9cae36e37d91a3dc086143d6047c8a8 (patch)
treea0d441e7a317f8b99a3d4feaed49db3f1628306a /drivers/power
parenta1bbec72f9fef100bb00762e36c20055deacd0e2 (diff)
power: supply: bq24735: remove incorrect le16_to_cpu calls
i2c_smbus commands handle the correct byte order for smbus transactions internally. This will currently result in incorrect operation on big endian systems. Signed-off-by: Phil Reid <preid@electromag.com.au> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/bq24735-charger.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/power/supply/bq24735-charger.c b/drivers/power/supply/bq24735-charger.c
index eb0145380def..6931e1d826f5 100644
--- a/drivers/power/supply/bq24735-charger.c
+++ b/drivers/power/supply/bq24735-charger.c
@@ -81,14 +81,12 @@ static int bq24735_charger_property_is_writeable(struct power_supply *psy,
static inline int bq24735_write_word(struct i2c_client *client, u8 reg,
u16 value)
{
- return i2c_smbus_write_word_data(client, reg, le16_to_cpu(value));
+ return i2c_smbus_write_word_data(client, reg, value);
}
static inline int bq24735_read_word(struct i2c_client *client, u8 reg)
{
- s32 ret = i2c_smbus_read_word_data(client, reg);
-
- return ret < 0 ? ret : le16_to_cpu(ret);
+ return i2c_smbus_read_word_data(client, reg);
}
static int bq24735_update_word(struct i2c_client *client, u8 reg,