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>
This commit is contained in:
Tejun Heo
2010-12-11 17:51:45 +01:00
committed by Anton Vorontsov
parent 3a2dbd611b
commit bc51e7ff52
6 changed files with 20 additions and 20 deletions

View File

@@ -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;
}