[ar71xx] create firmware image for the Ubiquiti LS-SR71 board
[openwrt.git] / target / linux / s3c24xx / patches-2.6.26 / 1248-fix-pcf50633-usbrem-charging-led.patch.patch
1 From 8d2916df234dc4762dd019db2ace105a6e744894 Mon Sep 17 00:00:00 2001
2 From: Andy Green <andy@openmoko.com>
3 Date: Sun, 10 Aug 2008 09:15:59 +0100
4 Subject: [PATCH] fix-pcf50633-usbrem-charging-led.patch
5
6 If the charger was removed, we fell through back to old
7 hdq-driven code with normally wrong but slightly random
8 results for charging LED behaviour in that circumstance
9
10 This patch makes us use the tracked charger status
11 callbacks alone if they are defined in the platform
12 data.
13
14 Signed-off-by: Andy Green <andy@openmoko.com>
15 ---
16 drivers/power/bq27000_battery.c | 12 ++++++++----
17 1 files changed, 8 insertions(+), 4 deletions(-)
18
19 diff --git a/drivers/power/bq27000_battery.c b/drivers/power/bq27000_battery.c
20 index 7020608..4c7e862 100644
21 --- a/drivers/power/bq27000_battery.c
22 +++ b/drivers/power/bq27000_battery.c
23 @@ -182,12 +182,16 @@ static int bq27000_battery_get_property(struct power_supply *psy,
24 */
25 if (!di->pdata->get_charger_active_status)
26 goto use_bat;
27 - if ((di->pdata->get_charger_active_status)())
28 +
29 + if ((di->pdata->get_charger_active_status)()) {
30 val->intval = POWER_SUPPLY_STATUS_CHARGING;
31 - else
32 - val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING;
33 - break;
34 + break;
35 + }
36 }
37 +
38 + val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING;
39 + break;
40 +
41 use_bat:
42 /*
43 * either the charger is not connected, or the
44 --
45 1.5.6.3
46
This page took 0.038593 seconds and 5 git commands to generate.