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;
