Update status battery
authorMichael Trimarchi <trimarchi@gandalf.sssup.it>
Thu, 23 Apr 2009 07:12:14 +0000 (09:12 +0200)
committerNelson Castillo <arhuaco@freaks-unidos.net>
Thu, 23 Apr 2009 23:38:46 +0000 (18:38 -0500)
This patch adds the call to the worker in
bq27000_battery_external_power_changed. Now (un)plugging the USB cable
effects the battery status soon. I don't know if it is possible call
the status change directly.

Signed-off-by: Michael Trimarchi <michael@panicking.kicks-ass.org>
Signed-off-by: Daniel Willmann <daniel@totalueberwachung.de>
drivers/power/bq27000_battery.c

index bc3856e..9f0f1a9 100644 (file)
@@ -173,6 +173,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);
 
        dev_dbg(di->dev, "%s\n", __FUNCTION__);
+       schedule_delayed_work(&di->work, 0);
 }
 
 static int bq27000_battery_get_property(struct power_supply *psy,