Daniel Willmann wrote:
This patch adds the power_supply_changed call back to
bq27000_battery_external_power_changed. Now (un)plugging the USB cable
effects the battery status immediately.
Signed-off-by: Daniel Willmann <[email protected]>
---
drivers/power/bq27000_battery.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/power/bq27000_battery.c b/drivers/power/bq27000_battery.c
index bc3856e..c42211a 100644
--- a/drivers/power/bq27000_battery.c
+++ b/drivers/power/bq27000_battery.c
@@ -172,6 +172,7 @@ static void bq27000_battery_external_power_changed(struct
power_supply *psy)
{
struct bq27000_device_info *di = container_of(psy, struct
bq27000_device_info, bat);
+ power_supply_changed(&di->bat);
Are you sure that you can call that funtion from there?
dev_dbg(di->dev, "%s\n", __FUNCTION__);
}
I send a different fix... Can you test?
Michael