diff options
Diffstat (limited to 'drivers/power/bq27x00_battery.c')
-rw-r--r-- | drivers/power/bq27x00_battery.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/power/bq27x00_battery.c b/drivers/power/bq27x00_battery.c index 82ab6ca45f58..98bf5676318d 100644 --- a/drivers/power/bq27x00_battery.c +++ b/drivers/power/bq27x00_battery.c | |||
@@ -598,6 +598,14 @@ static int bq27x00_powersupply_init(struct bq27x00_device_info *di) | |||
598 | 598 | ||
599 | static void bq27x00_powersupply_unregister(struct bq27x00_device_info *di) | 599 | static void bq27x00_powersupply_unregister(struct bq27x00_device_info *di) |
600 | { | 600 | { |
601 | /* | ||
602 | * power_supply_unregister call bq27x00_battery_get_property which | ||
603 | * call bq27x00_battery_poll. | ||
604 | * Make sure that bq27x00_battery_poll will not call | ||
605 | * schedule_delayed_work again after unregister (which cause OOPS). | ||
606 | */ | ||
607 | poll_interval = 0; | ||
608 | |||
601 | cancel_delayed_work_sync(&di->work); | 609 | cancel_delayed_work_sync(&di->work); |
602 | 610 | ||
603 | power_supply_unregister(&di->bat); | 611 | power_supply_unregister(&di->bat); |