summaryrefslogtreecommitdiffstats
path: root/drivers/char/rtc.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-08-15 05:10:26 +0200
committerJeff Garzik <jgarzik@pobox.com>2005-08-15 05:10:26 +0200
commit20445cc9159089d9d6b88d7864578efb10eb6590 (patch)
treefbbb27fd8baa82c77ebc4e020e8ee9ddb57e3ae2 /drivers/char/rtc.c
parent[PATCH] hostap: Use ieee80211 WLAN_FC_GET_{TYPE,STYPE} (diff)
parentMerge /spare/repo/linux-2.6/ (diff)
downloadlinux-20445cc9159089d9d6b88d7864578efb10eb6590.tar.xz
linux-20445cc9159089d9d6b88d7864578efb10eb6590.zip
/spare/repo/netdev-2.6 branch 'ieee80211'
Diffstat (limited to 'drivers/char/rtc.c')
-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