patch-2.4.0-test9 linux/drivers/sound/aedsp16.c

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

diff -u --recursive --new-file v2.4.0-test8/linux/drivers/sound/aedsp16.c linux/drivers/sound/aedsp16.c
@@ -241,6 +241,9 @@
    - Module informations added.
    - Removed aedsp16_delay_10msec(), now using mdelay(10)
    - All data and funcs moved to .*.init section.
+   v1.3
+   Arnaldo Carvalho de Melo <acme@conectiva.com.br> - 2000/09/27
+   - got rid of check_region
 
    Known Problems:
    - Audio Excel DSP 16 III don't work with this driver.
@@ -252,7 +255,7 @@
  */
 
 
-#define VERSION "1.2"		/* Version of Audio Excel DSP 16 driver */
+#define VERSION "1.3"		/* Version of Audio Excel DSP 16 driver */
 
 #undef	AEDSP16_DEBUG 1		/* Define this to enable debug code     */
 #undef	AEDSP16_DEBUG_MORE 1	/* Define this to enable more debug     */
@@ -1174,25 +1177,18 @@
 	if (ae_config.init & INIT_MSS)
 		return FALSE;
 /*
- * We must check the CONFIG_AEDSP16_BASE region too because these are the I/O 
- * ports to access card's control registers.
+ * We must allocate the CONFIG_AEDSP16_BASE region too because these are the 
+ * I/O ports to access card's control registers.
  */
 	if (!(ae_config.init & INIT_MPU401)) {
-		if (check_region(ae_config.base_io, IOBASE_REGION_SIZE)) {
+		if (!request_region(ae_config.base_io, IOBASE_REGION_SIZE,
+				"aedsp16 (base)")) {
 			printk(
 			"AEDSP16 BASE I/O port region is already in use.\n");
 			return FALSE;
 		}
 	}
 
-/*
- * We must allocate the CONFIG_AEDSP16_BASE region too because these are the 
- * I/O ports to access card's control registers.
- */
-	if (!(ae_config.init & INIT_MPU401))
-		request_region(ae_config.base_io, IOBASE_REGION_SIZE,
-				"aedsp16 (base)");
-
 	ae_config.init |= INIT_MSS;
 
 	DBG(("done.\n"));
@@ -1222,20 +1218,17 @@
 		return FALSE;
 
 /*
- * We must check the CONFIG_AEDSP16_BASE region too because these are the I/O 
+ * We must request the CONFIG_AEDSP16_BASE region too because these are the I/O 
  * ports to access card's control registers.
  */
 	if (!(ae_config.init & (INIT_MSS | INIT_SBPRO))) {
-		if (check_region(ae_config.base_io, IOBASE_REGION_SIZE)) {
+		if (!request_region(ae_config.base_io, IOBASE_REGION_SIZE,
+					"aedsp16 (base)")) {
 			printk(
 			"AEDSP16 BASE I/O port region is already in use.\n");
 			return FALSE;
 		}
 	}
-
-	if (!(ae_config.init & (INIT_MSS | INIT_SBPRO)))
-		request_region(ae_config.base_io, IOBASE_REGION_SIZE,
-				"aedsp16 (base)");
 
 	ae_config.init |= INIT_MPU401;
 

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