diff options
author | Tejun Heo <tj@kernel.org> | 2010-12-11 17:51:45 +0100 |
---|---|---|
committer | Anton Vorontsov <cbouatmailru@gmail.com> | 2010-12-22 00:39:56 +0100 |
commit | bc51e7ff521f28a7f14dc2f25307ad9101d1305a (patch) | |
tree | 011477cb2e90d2038261170a4e688f795d6720f9 /drivers/power/intel_mid_battery.c | |
parent | power_supply: Fix use after free and memory leak (diff) | |
download | linux-bc51e7ff521f28a7f14dc2f25307ad9101d1305a.tar.xz linux-bc51e7ff521f28a7f14dc2f25307ad9101d1305a.zip |
power_supply: Don't use flush_scheduled_work()
flush_scheduled_work() is deprecated and scheduled to be removed.
In battery drivers, the work can be canceled on probe failure and
removal and should be flushed on suspend. Replace
flush_scheduled_work() usages with direct cancels and flushes.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Diffstat (limited to 'drivers/power/intel_mid_battery.c')
-rw-r--r-- | drivers/power/intel_mid_battery.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/intel_mid_battery.c b/drivers/power/intel_mid_battery.c index 2a10cd361181..236147c3a5c6 100644 --- a/drivers/power/intel_mid_battery.c +++ b/drivers/power/intel_mid_battery.c @@ -767,7 +767,7 @@ static int __devexit platform_pmic_battery_remove(struct platform_device *pdev) power_supply_unregister(&pbi->usb); power_supply_unregister(&pbi->batt); - flush_scheduled_work(); + cancel_work_sync(&pbi->handler); kfree(pbi); return 0; } |