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:

committed by
Anton Vorontsov

parent
3a2dbd611b
commit
bc51e7ff52
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user