Skip to content

Commit

Permalink
rtc: don't use flush_scheduled_work()
Browse files Browse the repository at this point in the history
flush_scheduled_work() is deprecated and scheduled to be removed.  On
removal, directly cancel the work, and flush the uie_task in
rtc-dev.c::clear_uie().

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: rtc-linux@googlegroups.com
  • Loading branch information
Tejun Heo committed Dec 24, 2010
1 parent 0d9ee5b commit 9db8995
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static int clear_uie(struct rtc_device *rtc)
}
if (rtc->uie_task_active) {
spin_unlock_irq(&rtc->irq_lock);
flush_scheduled_work();
flush_work_sync(&rtc->uie_task);
spin_lock_irq(&rtc->irq_lock);
}
rtc->uie_irq_active = 0;
Expand Down
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-ds1305.c
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ static int __devexit ds1305_remove(struct spi_device *spi)
if (spi->irq) {
set_bit(FLAG_EXITING, &ds1305->flags);
free_irq(spi->irq, ds1305);
flush_scheduled_work();
cancel_work_sync(&ds1305->work);
}

rtc_device_unregister(ds1305->rtc);
Expand Down
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-ds1374.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ static int __devexit ds1374_remove(struct i2c_client *client)
mutex_unlock(&ds1374->mutex);

free_irq(client->irq, client);
flush_scheduled_work();
cancel_work_sync(&ds1374->work);
}

rtc_device_unregister(ds1374->rtc);
Expand Down
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-ds3232.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ static int __devexit ds3232_remove(struct i2c_client *client)
mutex_unlock(&ds3232->mutex);

free_irq(client->irq, client);
flush_scheduled_work();
cancel_work_sync(&ds3232->work);
}

rtc_device_unregister(ds3232->rtc);
Expand Down
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-rx8025.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ static int __devexit rx8025_remove(struct i2c_client *client)
mutex_unlock(lock);

free_irq(client->irq, client);
flush_scheduled_work();
cancel_work_sync(&rx8025->work);
}

rx8025_sysfs_unregister(&client->dev);
Expand Down

0 comments on commit 9db8995

Please sign in to comment.