summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAnish Trivedi <anish@freescale.com>2010-10-05 16:01:18 -0500
committerAnish Trivedi <anish@freescale.com>2010-10-05 16:08:03 -0500
commite5f01f0f81914920485e586c6dd573b0ade37a5c (patch)
tree4e62006560f2051794f15993b182d48c21f8a101 /drivers
parent7bb6acfa4d2e4fe70a4854ad9ce6d828db0b1d33 (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')
-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);