Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116269
b: refs/heads/master
c: 8aef7e8
h: refs/heads/master
i:
  116267: 5183726
v: v3
  • Loading branch information
Harvey Harrison authored and Anton Vorontsov committed Sep 25, 2008
1 parent 7259ff7 commit 42c33ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 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: 6a9037887ccea92152b034edeb15d453d1a98555
refs/heads/master: 8aef7e8f8de2d900da892085edbf14ea35fe6881
5 changes: 2 additions & 3 deletions trunk/drivers/power/bq27x00_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#include <linux/platform_device.h>
#include <linux/power_supply.h>
#include <linux/idr.h>

#include <linux/i2c.h>
#include <asm/unaligned.h>

#define DRIVER_VERSION "1.0.0"

Expand All @@ -33,7 +33,6 @@
#define BQ27x00_REG_RSOC 0x0B /* Relative State-of-Charge */
#define BQ27x00_REG_AI 0x14
#define BQ27x00_REG_FLAGS 0x0A
#define HIGH_BYTE(A) ((A) << 8)

/* If the system has several batteries we need a different name for each
* of them...
Expand Down Expand Up @@ -239,7 +238,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 = data[1] | HIGH_BYTE(data[0]);
*rt_value = get_unaligned_be16(data);
else
*rt_value = data[0];

Expand Down

0 comments on commit 42c33ab

Please sign in to comment.