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

Next file: linux/drivers/sound/soundvers.h
Previous file: linux/drivers/sound/sound_switch.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.77/linux/drivers/sound/soundcard.c linux/drivers/sound/soundcard.c
@@ -389,8 +389,6 @@
 
 #endif
 
-static int      debugmem = 0;	/* switched off by default */
-
 static int      sound[20] =
 {0};
 
@@ -442,6 +440,11 @@
 {
   int             i;
 
+  if (MOD_IN_USE)
+    {
+      return;
+    }
+
   if (chrdev_registered)
     module_unregister_chrdev (sound_major, "sound");
 
@@ -461,6 +464,7 @@
 	printk ("Sound: Hmm, DMA%d was left allocated - fixed\n", i);
 	sound_free_dma (i);
       }
+
 }
 #endif
 
@@ -599,6 +603,8 @@
 fatal_error__This_version_is_not_compatible_with_this_kernel;
 #endif
 
+static int      debugmem = 0;	/* switched off by default */
+
 static int      dma_buffsize = DSP_BUFFSIZE;
 
 int
@@ -647,7 +653,7 @@
 
       audio_devs[dev]->buffsize = PAGE_SIZE * (1 << sz);
 
-      if ((start_addr = (char *) __get_free_pages (GFP_ATOMIC, sz, 1)) == NULL)
+      if ((start_addr = (char *) __get_free_pages (GFP_ATOMIC, sz, MAX_DMA_ADDRESS)) == NULL)
 	audio_devs[dev]->buffsize /= 2;
     }
 
@@ -726,6 +732,7 @@
   printk ("Exited sound_map_buffer()\n");
   return -EINVAL;
 }
+#endif
 
 void
 conf_printf (char *name, struct address_info *hw_config)
@@ -768,4 +775,3 @@
 
   printk ("\n");
 }
-#endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this