diff options
author | Tejun Heo <tj@kernel.org> | 2010-12-24 16:00:17 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-12-24 16:00:17 +0100 |
commit | afdb32f2e463a195c104555ac9a8cdd39a2b6561 (patch) | |
tree | c15b2106066f2c8e838eabacc6f1525973e55477 /drivers/mfd/menelaus.c | |
parent | 0d9c76aedbac3ad8ac4e99a2b441bc3f91dd6679 (diff) | |
download | kernel_goldelico_gta04-afdb32f2e463a195c104555ac9a8cdd39a2b6561.zip kernel_goldelico_gta04-afdb32f2e463a195c104555ac9a8cdd39a2b6561.tar.gz kernel_goldelico_gta04-afdb32f2e463a195c104555ac9a8cdd39a2b6561.tar.bz2 |
mfd: update workqueue usages
flush_scheduled_work() is deprecated and scheduled to be removed.
* In menelaus, flush menelaus->work directly on probe failure. Also,
make sure the work isn't running on removal.
* In tps65010, cancel_delayed_work() + flush_scheduled_work() ->
cancel_delayed_work_sync(). While at it, remove unnecessary (void)
casts on return value, and use schedule_delayed_work() and
to_delayed_work() instead of using delayed_work's internal work
field.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/menelaus.c')
-rw-r--r-- | drivers/mfd/menelaus.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c index 4ba85bb..9cee8e7 100644 --- a/drivers/mfd/menelaus.c +++ b/drivers/mfd/menelaus.c @@ -1259,7 +1259,7 @@ static int menelaus_probe(struct i2c_client *client, return 0; fail2: free_irq(client->irq, menelaus); - flush_scheduled_work(); + flush_work_sync(&menelaus->work); fail1: kfree(menelaus); return err; @@ -1270,6 +1270,7 @@ static int __exit menelaus_remove(struct i2c_client *client) struct menelaus_chip *menelaus = i2c_get_clientdata(client); free_irq(client->irq, menelaus); + flush_work_sync(&menelaus->work); kfree(menelaus); the_menelaus = NULL; return 0; |