From patchwork Wed Jun 15 16:13:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: rtc: don't use flush_scheduled_work() in rtc-88pm860x and rtc-dev Date: Wed, 15 Jun 2011 06:13:43 -0000 From: Tejun Heo X-Patchwork-Id: 100551 Message-Id: <20110615161343.GC8141@htj.dyndns.org> To: Alessandro Zummo , rtc-linux@googlegroups.com Cc: rtc-linux@googlegroups.com 9db8995be5e (rtc: don't use flush_scheduled_work()) removed flush_scheduled_work() users from rtc but two new ones were added afterwards. Convert them to directly cancel/flush the used work item. flush_scheduled_work() will soon be marked deprecated. Signed-off-by: Tejun Heo Cc: Alessandro Zummo Cc: rtc-linux@googlegroups.com --- I'm planning on marking flush_scheduled_work() deprecated in linux-next soonish. It would be great if this can appear there via rtc tree. Thank you. drivers/rtc/rtc-88pm860x.c | 2 +- drivers/rtc/rtc-dev.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: work/drivers/rtc/rtc-88pm860x.c =================================================================== --- work.orig/drivers/rtc/rtc-88pm860x.c +++ work/drivers/rtc/rtc-88pm860x.c @@ -389,7 +389,7 @@ static int __devexit pm860x_rtc_remove(s struct pm860x_rtc_info *info = platform_get_drvdata(pdev); #ifdef VRTC_CALIBRATION - flush_scheduled_work(); + cancel_delayed_work_sync(&info->calib_work); /* disable measurement */ pm860x_set_bits(info->i2c, PM8607_MEAS_EN2, MEAS2_VRTC, 0); #endif /* VRTC_CALIBRATION */ Index: work/drivers/rtc/rtc-dev.c =================================================================== --- work.orig/drivers/rtc/rtc-dev.c +++ work/drivers/rtc/rtc-dev.c @@ -104,7 +104,7 @@ static int clear_uie(struct rtc_device * } 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;