[tlinux-users:08156] Re: New release of omnibook module soon: testing welcome

Mathieu Bérard <[email protected]>
Newsgroups gmane.linux.hardware.toshiba
Message-ID <[email protected]>
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:

--- 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;
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.