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

pwaechtler@mac.com
Thu, 29 Aug 2002 21:56:27 +0200


--- 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/