]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] move snd_legacy_find_free_ioport to opti92x-ad1848.c
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 13 Jan 2003 12:12:02 +0000 (04:12 -0800)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Mon, 13 Jan 2003 12:12:02 +0000 (04:12 -0800)
From:  Marcus Alanen <maalanen@ra.abo.fi>

  Moves the snd_legacy_find_free_ioport definition to opti92x-ad1848.c,
  since it is the only user.

include/sound/initval.h
sound/isa/opti9xx/opti92x-ad1848.c

index 2cced5c7eb060065849d38b576000c5aefc5e7ef..4cc972dd71eed42a0e3dc3ff7e2c8b76d52ee2bf 100644 (file)
@@ -97,18 +97,6 @@ static int snd_legacy_auto_probe(unsigned long *ports, int (*probe)(unsigned lon
 }
 #endif
 
-#ifdef SNDRV_LEGACY_FIND_FREE_IOPORT
-static long snd_legacy_find_free_ioport(long *port_table, long size)
-{
-       while (*port_table != -1) {
-               if (!check_region(*port_table, size))
-                       return *port_table;
-               port_table++;
-       }
-       return -1;
-}
-#endif
-
 #ifdef SNDRV_LEGACY_FIND_FREE_IRQ
 #include <linux/interrupt.h>
 
index 648f7c083fdb941e2851e5c291fe2d5f482ab5dd..b1d48c8eb882c9369fc9e04a65496c903cc62abb 100644 (file)
@@ -47,7 +47,6 @@
 #endif /* CS4231 */
 #include <sound/mpu401.h>
 #include <sound/opl3.h>
-#define SNDRV_LEGACY_FIND_FREE_IOPORT
 #define SNDRV_LEGACY_FIND_FREE_IRQ
 #define SNDRV_LEGACY_FIND_FREE_DMA
 #define SNDRV_GET_ID
@@ -324,6 +323,16 @@ static char * snd_opti9xx_names[] = {
 };
 
 
+static long snd_legacy_find_free_ioport(long *port_table, long size)
+{
+       while (*port_table != -1) {
+               if (!check_region(*port_table, size))
+                       return *port_table;
+               port_table++;
+       }
+       return -1;
+}
+
 static int __init snd_opti9xx_init(opti9xx_t *chip, unsigned short hardware)
 {
        static int opti9xx_mc_size[] = {7, 7, 10, 10, 2, 2, 2};