[PATCH] 29/41 sound/oss/soundcard.c - convert cli to spinlocks

From: pwaechtler@mac.com
Date: Thu Aug 29 2002 - 14:56:27 EST


--- vanilla-2.5.32/sound/oss/soundcard.c Sat Aug 10 00:10:57 2002
+++ linux-2.5-cli-oss/sound/oss/soundcard.c Wed Aug 14 22:24:33 2002
@@ -658,22 +658,16 @@
 
 int sound_open_dma(int chn, char *deviceID)
 {
- unsigned long flags;
-
         if (!valid_dma(chn)) {
                 printk(KERN_ERR "sound_open_dma: Invalid DMA channel %d\n", chn);
                 return 1;
         }
- save_flags(flags);
- cli();
 
         if (dma_alloc_map[chn] != DMA_MAP_FREE) {
                 printk("sound_open_dma: DMA channel %d busy or not allocated (%d)\n", chn, dma_alloc_map[chn]);
- restore_flags(flags);
                 return 1;
         }
         dma_alloc_map[chn] = DMA_MAP_BUSY;
- restore_flags(flags);
         return 0;
 }
 
@@ -689,18 +683,11 @@
 
 void sound_close_dma(int chn)
 {
- unsigned long flags;
-
- save_flags(flags);
- cli();
-
         if (dma_alloc_map[chn] != DMA_MAP_BUSY) {
                 printk(KERN_ERR "sound_close_dma: Bad access to DMA channel %d\n", chn);
- restore_flags(flags);
                 return;
         }
         dma_alloc_map[chn] = DMA_MAP_FREE;
- restore_flags(flags);
 }
 
 static void do_sequencer_timer(unsigned long dummy)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Aug 31 2002 - 22:00:28 EST