Update of /cvsroot/alsa/alsa-kernel/isa/wavefront
In directory usw-pr-cvs1:/tmp/cvs-serv21790/isa/wavefront

Modified Files:
        wavefront.c wavefront_synth.c 
Log Message:
Removal of save_flags/cli/restore_flags for 2.5

Index: wavefront.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/isa/wavefront/wavefront.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- wavefront.c 13 Aug 2002 16:13:39 -0000      1.16
+++ wavefront.c 3 Oct 2002 10:35:18 -0000       1.17
@@ -495,6 +495,7 @@
        }
        acard = (snd_wavefront_card_t *)card->private_data;
        acard->wavefront.irq = -1;
+       spin_lock_init(&acard->wavefront.irq_lock);
        init_waitqueue_head(&acard->wavefront.interrupt_sleeper);
        spin_lock_init(&acard->wavefront.midi.open);
        spin_lock_init(&acard->wavefront.midi.virtual);

Index: wavefront_synth.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/isa/wavefront/wavefront_synth.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- wavefront_synth.c   12 Aug 2002 08:43:47 -0000      1.9
+++ wavefront_synth.c   3 Oct 2002 10:35:18 -0000       1.10
@@ -1705,9 +1705,11 @@
                return;
        }
 
+       spin_lock(&dev->irq_lock);
        dev->irq_ok = 1;
        dev->irq_cnt++;
-       wake_up_interruptible (&dev->interrupt_sleeper);
+       spin_unlock(&dev->irq_lock);
+       wake_up(&dev->interrupt_sleeper);
 }
 
 /* STATUS REGISTER 
@@ -1755,14 +1757,20 @@
                                  int val, int port, int timeout)
 
 {
-       unsigned long flags;
+       wait_queue_t wait;
 
-       save_flags (flags);
-       cli();
+       init_waitqueue_entry(&wait, current);
+       spin_lock_irq(&dev->irq_lock);
+       add_wait_queue(&dev->interrupt_sleeper, &wait);
        dev->irq_ok = 0;
        outb (val,port);
-       interruptible_sleep_on_timeout (&dev->interrupt_sleeper, timeout);
-       restore_flags (flags);
+       spin_unlock_irq(&dev->irq_lock);
+       while (1) {
+               if ((timeout = schedule_timeout(timeout)) == 0)
+                       return;
+               if (dev->irq_ok)
+                       return;
+       }
 }
 
 static int __init



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to