From ecbd4110234f7ea955b8926d6fa066ae55125bf2 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 13 Jan 2003 04:12:02 -0800 Subject: [PATCH] [PATCH] move snd_legacy_find_free_ioport to opti92x-ad1848.c From: Marcus Alanen Moves the snd_legacy_find_free_ioport definition to opti92x-ad1848.c, since it is the only user. --- include/sound/initval.h | 12 ------------ sound/isa/opti9xx/opti92x-ad1848.c | 11 ++++++++++- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/include/sound/initval.h b/include/sound/initval.h index 2cced5c7eb06..4cc972dd71ee 100644 --- a/include/sound/initval.h +++ b/include/sound/initval.h @@ -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 diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c index 648f7c083fdb..b1d48c8eb882 100644 --- a/sound/isa/opti9xx/opti92x-ad1848.c +++ b/sound/isa/opti9xx/opti92x-ad1848.c @@ -47,7 +47,6 @@ #endif /* CS4231 */ #include #include -#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}; -- 2.39.5