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

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

diff -u --recursive --new-file v2.2.2/linux/drivers/sound/soundcard.c linux/drivers/sound/soundcard.c
@@ -67,7 +67,11 @@
 int             sound_nblocks = 0;
 
 /* Persistent DMA buffers */
-int		sound_dmap_flag = 0;	/* Off by default */
+#ifdef CONFIG_SOUND_DMAP
+int		sound_dmap_flag = 1;
+#else
+int		sound_dmap_flag = 0;
+#endif
 
 static int      soundcard_configured = 0;
 
@@ -751,9 +755,6 @@
 		vma->vm_page_prot))
 		return -EAGAIN;
 
-	vma->vm_file = file;
-	file->f_count++;
-
 	dmap->mapping_flags |= DMA_MAP_MAPPED;
 
 	if( audio_devs[dev]->d->mmap)
@@ -802,13 +803,6 @@
 	return -1;
 }
 
-static void destroy_special_devices(void)
-{
-	unregister_sound_special(6);
-	unregister_sound_special(1);
-	unregister_sound_special(8);
-}
-
 #ifdef MODULE
 static void
 #else
@@ -849,11 +843,18 @@
 #endif		
 }
 
+#ifdef MODULE
+
+static void destroy_special_devices(void)
+{
+	unregister_sound_special(6);
+	unregister_sound_special(1);
+	unregister_sound_special(8);
+}
+
 static int      sound[20] = {
 	0
 };
-
-#ifdef MODULE
 
 int traceinit = 0;
 static int dmabuf = 0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)