[tlinux-users:08157] Re: New release of omnibook module soon: testing welcome
Mathieu Bérard <[email protected]>
| Newsgroups | gmane.linux.hardware.toshiba |
|---|---|
| Message-ID | <[email protected]> |
Mathieu Bérard a écrit : > Renato S. Yamane a écrit : >> >> I will apply this patch in this midnight (GMT -3), because I can't >> turn-off my laptop now. >> >> >> > Ok thanks. > The patch has been mangled by my mail agent, > here a correct one: Hum forget that thunderbird decided to be nasty. Patch sent as attachment. Sorry for the spam.
rtc_lock.patch
(text/x-patch, 854 B)
--- trunk/nbsmi.c 2006-09-15 11:02:24.953530294 +0200
+++ renato/nbsmi.c 2006-09-15 11:02:33.951157650 +0200
@@ -174,12 +174,14 @@
{
int count;
u32 retval = 0;
-
+ unsigned long flags;
+
+ spin_lock_irqsave(&rtc_lock,flags);
for (count = 0; count < BUFFER_SIZE; count++) {
outb(count + start_offset, RTC_PORT(2));
outb(*(inputbuffer + count), RTC_PORT(3));
}
-
+ spin_unlock_irqrestore(&rtc_lock,flags);
/*
* We have to write 0xe4XX to smi_port
* where XX is the SMI function code
@@ -201,10 +203,12 @@
if (retval)
printk(O_ERR "smi_command failed with error %u.\n", retval);
+ spin_lock_irqsave(&rtc_lock,flags);
for (count = 0; count < BUFFER_SIZE; count++) {
outb(count + start_offset, RTC_PORT(2));
*(outputbuffer + count) = inb(RTC_PORT(3));
}
+ spin_unlock_irqrestore(&rtc_lock,flags);
return retval;
}