Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185684
b: refs/heads/master
c: 97f70c2
h: refs/heads/master
v: v3
  • Loading branch information
Grazvydas Ignotas authored and Anton Vorontsov committed Feb 16, 2010
1 parent 1b77925 commit a762800
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5324dc0e3872324ed0bf372bce7bc437436910b6
refs/heads/master: 97f70c23a1fa1bffe79187563dc5c6f2c72420a2
11 changes: 3 additions & 8 deletions trunk/drivers/power/bq27x00_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,7 @@ static enum power_supply_property bq27x00_battery_props[] = {
static int bq27x00_read(u8 reg, int *rt_value, int b_single,
struct bq27x00_device_info *di)
{
int ret;

ret = di->bus->read(reg, rt_value, b_single, di);
*rt_value = be16_to_cpu(*rt_value);

return ret;
return di->bus->read(reg, rt_value, b_single, di);
}

/*
Expand Down Expand Up @@ -161,7 +156,7 @@ static int bq27x00_battery_rsoc(struct bq27x00_device_info *di)
return ret;
}

return rsoc >> 8;
return rsoc;
}

#define to_bq27x00_device_info(x) container_of((x), \
Expand Down Expand Up @@ -238,7 +233,7 @@ static int bq27200_read(u8 reg, int *rt_value, int b_single,
err = i2c_transfer(client->adapter, msg, 1);
if (err >= 0) {
if (!b_single)
*rt_value = get_unaligned_be16(data);
*rt_value = get_unaligned_le16(data);
else
*rt_value = data[0];

Expand Down

0 comments on commit a762800

Please sign in to comment.