summaryrefslogtreecommitdiffstats
path: root/drivers/power/power_supply_core.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-12-11 17:51:45 +0100
committerAnton Vorontsov <cbouatmailru@gmail.com>2010-12-22 02:39:56 +0300
commitbc51e7ff521f28a7f14dc2f25307ad9101d1305a (patch)
tree011477cb2e90d2038261170a4e688f795d6720f9 /drivers/power/power_supply_core.c
parent3a2dbd611b38cf9a026c0099a85701ad183d1949 (diff)
downloadlinux-stable-bc51e7ff521f28a7f14dc2f25307ad9101d1305a.tar.gz
linux-stable-bc51e7ff521f28a7f14dc2f25307ad9101d1305a.tar.bz2
linux-stable-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/power_supply_core.c')
-rw-r--r--drivers/power/power_supply_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c
index f06bad047d76..970f7335d3a7 100644
--- a/drivers/power/power_supply_core.c
+++ b/drivers/power/power_supply_core.c
@@ -201,7 +201,7 @@ EXPORT_SYMBOL_GPL(power_supply_register);
void power_supply_unregister(struct power_supply *psy)
{
- flush_scheduled_work();
+ cancel_work_sync(&psy->changed_work);
power_supply_remove_triggers(psy);
device_unregister(psy->dev);
}