From 66baa4cad0fec494eef80faa59191c3fa6241968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Tue, 1 Nov 2011 01:43:11 +0100 Subject: [PATCH] --- yaml --- r: 283450 b: refs/heads/master c: 8cfaaa811894a3ae2d7360a15a6cfccff3ebc7db h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/power/bq27x00_battery.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 97d97ce129ce..82726346b3bd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c6cd4f267d442f2ce279024adb03a69e8608e0f6 +refs/heads/master: 8cfaaa811894a3ae2d7360a15a6cfccff3ebc7db diff --git a/trunk/drivers/power/bq27x00_battery.c b/trunk/drivers/power/bq27x00_battery.c index 82ab6ca45f58..98bf5676318d 100644 --- a/trunk/drivers/power/bq27x00_battery.c +++ b/trunk/drivers/power/bq27x00_battery.c @@ -598,6 +598,14 @@ static int bq27x00_powersupply_init(struct bq27x00_device_info *di) static void bq27x00_powersupply_unregister(struct bq27x00_device_info *di) { + /* + * power_supply_unregister call bq27x00_battery_get_property which + * call bq27x00_battery_poll. + * Make sure that bq27x00_battery_poll will not call + * schedule_delayed_work again after unregister (which cause OOPS). + */ + poll_interval = 0; + cancel_delayed_work_sync(&di->work); power_supply_unregister(&di->bat);