diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/rtc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c index 6e6a7c7a7ef..ab6429b4a84 100644 --- a/drivers/char/rtc.c +++ b/drivers/char/rtc.c @@ -209,11 +209,12 @@ static const unsigned char days_in_mo[] = */ static inline unsigned char rtc_is_updating(void) { + unsigned long flags; unsigned char uip; - spin_lock_irq(&rtc_lock); + spin_lock_irqsave(&rtc_lock, flags); uip = (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP); - spin_unlock_irq(&rtc_lock); + spin_unlock_irqrestore(&rtc_lock, flags); return uip; } |