patch-2.1.86 linux/drivers/sound/soundcard.c

Next file: linux/drivers/sound/sscape.c
Previous file: linux/drivers/sound/sound_timer.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.85/linux/drivers/sound/soundcard.c linux/drivers/sound/soundcard.c
@@ -899,8 +899,8 @@
 	}
 #endif
 	sound_unload_drivers();
-
 	free_all_irqs();	/* If something was left allocated by accident */
+	sequencer_unload();
 
 	for (i = 0; i < 8; i++)
 	{
@@ -1057,11 +1057,10 @@
 
 static int dma_buffsize = DSP_BUFFSIZE;
 
-int
-sound_alloc_dmap(int dev, struct dma_buffparms *dmap, int chan)
+int sound_alloc_dmap(int dev, struct dma_buffparms *dmap, int chan)
 {
-	char           *start_addr, *end_addr;
-	int             i, dma_pagesize;
+	char *start_addr, *end_addr;
+	int i, dma_pagesize;
 
 	dmap->mapping_flags &= ~DMA_MAP_MAPPED;
 
@@ -1141,8 +1140,8 @@
 
 void sound_free_dmap(int dev, struct dma_buffparms *dmap, int chan)
 {
-	int             sz, size, i;
-	unsigned long   start_addr, end_addr;
+	int sz, size, i;
+	unsigned long start_addr, end_addr;
 
 	if (dmap->raw_buf == NULL)
 		return;
@@ -1150,9 +1149,7 @@
 	if (dmap->mapping_flags & DMA_MAP_MAPPED)
 		return;		/* Don't free mmapped buffer. Will use it next time */
 
-	for (sz = 0, size = PAGE_SIZE;
-	     size < dmap->buffsize;
-	     sz++, size <<= 1);
+	for (sz = 0, size = PAGE_SIZE; size < dmap->buffsize; sz++, size <<= 1);
 
 	start_addr = (unsigned long) dmap->raw_buf;
 	end_addr = start_addr + dmap->buffsize;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov