if (rtc_is_updating() != 0) msleep(20); 
while (rtc_is_updating() != 0 && jiffies - uip_watchdog < 2*HZ/100) { barrier(); cpu_relax(); } 
void rtc_get_rtc_time(struct rtc_time *rtc_tm){	unsigned char ctrl;#ifdef CONFIG_MACH_DECSTATION	unsigned int real_year;#endif	/*	 * read RTC once any update in progress is done. The update	 * can take just over 2ms. We wait 20ms. There is no need to	 * to poll-wait (up to 1s - eeccch) for the falling edge of RTC_UIP.	 * If you need to know *exactly* when a second has started, enable	 * periodic update complete interrupts, (via ioctl) and then 	 * immediately read /dev/rtc which will block until you get the IRQ.	 * Once the read clears, read the RTC time (again via ioctl). Easy.	 */	if (rtc_is_updating() != 0)		msleep(20);	/*	 * Only the values that we read from the RTC are set. We leave	 * tm_wday, tm_yday and tm_isdst untouched. Even though the	 * RTC has RTC_DAY_OF_WEEK, we ignore it, as it is only updated	 * by the RTC when initially set to a non-zero value.	 */	spin_lock_irq(&rtc_lock);	rtc_tm->tm_sec = CMOS_READ(RTC_SECONDS);	rtc_tm->tm_min = CMOS_READ(RTC_MINUTES);	rtc_tm->tm_hour = CMOS_READ(RTC_HOURS);	rtc_tm->tm_mday = CMOS_READ(RTC_DAY_OF_MONTH);	rtc_tm->tm_mon = CMOS_READ(RTC_MONTH);	rtc_tm->tm_year = CMOS_READ(RTC_YEAR);#ifdef CONFIG_MACH_DECSTATION	real_year = CMOS_READ(RTC_DEC_YEAR);#endif	ctrl = CMOS_READ(RTC_CONTROL);	spin_unlock_irq(&rtc_lock);	if (!(ctrl & RTC_DM_BINARY) || RTC_ALWAYS_BCD)	{		BCD_TO_BIN(rtc_tm->tm_sec);		BCD_TO_BIN(rtc_tm->tm_min);		BCD_TO_BIN(rtc_tm->tm_hour);		BCD_TO_BIN(rtc_tm->tm_mday);		BCD_TO_BIN(rtc_tm->tm_mon);		BCD_TO_BIN(rtc_tm->tm_year);	}#ifdef CONFIG_MACH_DECSTATION	rtc_tm->tm_year += real_year - 72;#endif	/*	 * Account for differences between how the RTC uses the values	 * and how they are defined in a struct rtc_time;	 */	if ((rtc_tm->tm_year += (epoch - 1900)) <= 69)		rtc_tm->tm_year += 100;	rtc_tm->tm_mon--;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/403fe5ae57c831968c3dbbaba291ae825a1c5aaa/rtc.c/clean/drivers/char/rtc.c