diff options
author | Len Brown <len.brown@intel.com> | 2005-08-05 13:03:06 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-08-05 13:03:06 -0400 |
commit | e872d4cace8681838e8d18d52c92f4870e980a08 (patch) | |
tree | 082b75cc52935efae68f9f744bc3f8807f7176c6 /drivers/char | |
parent | 1f3a730117ceda2a7c917d687921fe3c82283968 (diff) | |
parent | 403fe5ae57c831968c3dbbaba291ae825a1c5aaa (diff) |
Merge ../from-linus
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/rtc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c index d8f9e94ae475..cd4fe8b1709f 100644 --- a/drivers/char/rtc.c +++ b/drivers/char/rtc.c @@ -1209,6 +1209,7 @@ static int rtc_proc_open(struct inode *inode, struct file *file) void rtc_get_rtc_time(struct rtc_time *rtc_tm) { + unsigned long uip_watchdog = jiffies; unsigned char ctrl; #ifdef CONFIG_MACH_DECSTATION unsigned int real_year; @@ -1224,8 +1225,10 @@ void rtc_get_rtc_time(struct rtc_time *rtc_tm) * Once the read clears, read the RTC time (again via ioctl). Easy. */ - if (rtc_is_updating() != 0) - msleep(20); + while (rtc_is_updating() != 0 && jiffies - uip_watchdog < 2*HZ/100) { + barrier(); + cpu_relax(); + } /* * Only the values that we read from the RTC are set. We leave |