summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorAnish Trivedi <anish@freescale.com>2010-10-05 16:01:18 -0500
committerAndy Voltz <andy.voltz@timesys.com>2011-06-01 13:19:16 -0400
commit44586638917d1e1764b8ef263dcca9a55ed67a14 (patch)
tree4e62006560f2051794f15993b182d48c21f8a101 /drivers/rtc
parent0e294d94ff62e563253bfee116853f40b36a06d0 (diff)
ENGR00131573 SRTC Enable time set notification test
Added schedule() call after complete is called to ensure that signalled processes get a chance to handle the current time change value before any new time changes occur. Signed-off-by: Anish Trivedi <anish@freescale.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-mxc_v2.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-mxc_v2.c b/drivers/rtc/rtc-mxc_v2.c
index 710dc8be6d73..67faf5bb6025 100644
--- a/drivers/rtc/rtc-mxc_v2.c
+++ b/drivers/rtc/rtc-mxc_v2.c
@@ -361,7 +361,7 @@ static int mxc_rtc_ioctl(struct device *dev, unsigned int cmd,
return 0;
- /* NOTE: This IOCTL does not work properly on kernel 2.6.35 */
+ /* This IOCTL to be used by processes to be notified of time changes */
case RTC_WAIT_TIME_SET:
/* don't block without releasing mutex first */
@@ -436,6 +436,10 @@ static int mxc_rtc_set_time(struct device *dev, struct rtc_time *tm)
/* signal all waiting threads that time changed */
complete_all(&srtc_completion);
+
+ /* allow signalled threads to handle the time change notification */
+ schedule();
+
/* reinitialize completion variable */
INIT_COMPLETION(srtc_completion);