Commit 5e3823ac authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

[PATCH] BVME6000 core local_irq*() updates

Convert core BVME6000 code to new local_irq*() framework
parent ab627e97
......@@ -358,8 +358,7 @@ int bvme6000_set_clock_mmss (unsigned long nowtime)
? real_minutes - rtc_minutes
: rtc_minutes - real_minutes) < 30)
{
save_flags(flags);
cli();
local_irq_save(flags);
rtc_tenms = rtc->bcd_tenms;
while (rtc_tenms == rtc->bcd_tenms)
;
......@@ -367,7 +366,7 @@ int bvme6000_set_clock_mmss (unsigned long nowtime)
;
rtc->bcd_min = bin2bcd(real_minutes);
rtc->bcd_sec = bin2bcd(real_seconds);
restore_flags(flags);
local_irq_restore(flags);
}
else
retval = -1;
......
......@@ -49,8 +49,7 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
switch (cmd) {
case RTC_RD_TIME: /* Read the time/date from RTC */
{
save_flags(flags);
cli();
local_irq_save(flags);
/* Ensure clock and real-time-mode-register are accessible */
msr = rtc->msr & 0xc0;
rtc->msr = 0x40;
......@@ -66,7 +65,7 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
wtime.tm_wday = BCD2BIN(rtc->bcd_dow)-1;
} while (wtime.tm_sec != BCD2BIN(rtc->bcd_sec));
rtc->msr = msr;
restore_flags(flags);
local_irq_restore(flags);
return copy_to_user((void *)arg, &wtime, sizeof wtime) ?
-EFAULT : 0;
}
......@@ -106,8 +105,7 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
if (yrs >= 2070)
return -EINVAL;
save_flags(flags);
cli();
local_irq_save(flags);
/* Ensure clock and real-time-mode-register are accessible */
msr = rtc->msr & 0xc0;
rtc->msr = 0x40;
......@@ -125,7 +123,7 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
rtc->t0cr_rtmr = yrs%4 | 0x08;
rtc->msr = msr;
restore_flags(flags);
local_irq_restore(flags);
return 0;
}
default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment