Commit ecbd4110 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] move snd_legacy_find_free_ioport to opti92x-ad1848.c

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.
parent 58002c29
...@@ -97,18 +97,6 @@ static int snd_legacy_auto_probe(unsigned long *ports, int (*probe)(unsigned lon ...@@ -97,18 +97,6 @@ static int snd_legacy_auto_probe(unsigned long *ports, int (*probe)(unsigned lon
} }
#endif #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 #ifdef SNDRV_LEGACY_FIND_FREE_IRQ
#include <linux/interrupt.h> #include <linux/interrupt.h>
......
...@@ -47,7 +47,6 @@ ...@@ -47,7 +47,6 @@
#endif /* CS4231 */ #endif /* CS4231 */
#include <sound/mpu401.h> #include <sound/mpu401.h>
#include <sound/opl3.h> #include <sound/opl3.h>
#define SNDRV_LEGACY_FIND_FREE_IOPORT
#define SNDRV_LEGACY_FIND_FREE_IRQ #define SNDRV_LEGACY_FIND_FREE_IRQ
#define SNDRV_LEGACY_FIND_FREE_DMA #define SNDRV_LEGACY_FIND_FREE_DMA
#define SNDRV_GET_ID #define SNDRV_GET_ID
...@@ -324,6 +323,16 @@ static char * snd_opti9xx_names[] = { ...@@ -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 __init snd_opti9xx_init(opti9xx_t *chip, unsigned short hardware)
{ {
static int opti9xx_mc_size[] = {7, 7, 10, 10, 2, 2, 2}; static int opti9xx_mc_size[] = {7, 7, 10, 10, 2, 2, 2};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment