aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power/wm97xx_battery.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-12-11 11:51:45 -0500
committerAnton Vorontsov <cbouatmailru@gmail.com>2010-12-21 18:39:56 -0500
commitbc51e7ff521f28a7f14dc2f25307ad9101d1305a (patch)
tree011477cb2e90d2038261170a4e688f795d6720f9 /drivers/power/wm97xx_battery.c
parent3a2dbd611b38cf9a026c0099a85701ad183d1949 (diff)
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/wm97xx_battery.c')
-rw-r--r--drivers/power/wm97xx_battery.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/power/wm97xx_battery.c b/drivers/power/wm97xx_battery.c
index 5071d85ec12d..156559e56fa5 100644
--- a/drivers/power/wm97xx_battery.c
+++ b/drivers/power/wm97xx_battery.c
@@ -147,7 +147,7 @@ static irqreturn_t wm97xx_chrg_irq(int irq, void *data)
147#ifdef CONFIG_PM 147#ifdef CONFIG_PM
148static int wm97xx_bat_suspend(struct device *dev) 148static int wm97xx_bat_suspend(struct device *dev)
149{ 149{
150 flush_scheduled_work(); 150 flush_work_sync(&bat_work);
151 return 0; 151 return 0;
152} 152}
153 153
@@ -273,7 +273,7 @@ static int __devexit wm97xx_bat_remove(struct platform_device *dev)
273 free_irq(gpio_to_irq(pdata->charge_gpio), dev); 273 free_irq(gpio_to_irq(pdata->charge_gpio), dev);
274 gpio_free(pdata->charge_gpio); 274 gpio_free(pdata->charge_gpio);
275 } 275 }
276 flush_scheduled_work(); 276 cancel_work_sync(&bat_work);
277 power_supply_unregister(&bat_ps); 277 power_supply_unregister(&bat_ps);
278 kfree(prop); 278 kfree(prop);
279 return 0; 279 return 0;