summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2005-08-05 13:03:06 -0400
committerLen Brown <len.brown@intel.com>2005-08-05 13:03:06 -0400
commite872d4cace8681838e8d18d52c92f4870e980a08 (patch)
tree082b75cc52935efae68f9f744bc3f8807f7176c6 /drivers/char
parent1f3a730117ceda2a7c917d687921fe3c82283968 (diff)
parent403fe5ae57c831968c3dbbaba291ae825a1c5aaa (diff)
Merge ../from-linus
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/rtc.c7
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