diff options
author | Ondrej Zary <linux@rainbow-software.org> | 2012-08-01 16:05:39 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-08-03 12:57:44 +0200 |
commit | 988aec3de5f0fa848f26fbf64f9e83364d6b3c25 (patch) | |
tree | 44dba73a859c16b6cc8f14074bf8e793a781a82e /include/sound/initval.h | |
parent | Linux 3.6-rc1 (diff) | |
download | linux-988aec3de5f0fa848f26fbf64f9e83364d6b3c25.tar.xz linux-988aec3de5f0fa848f26fbf64f9e83364d6b3c25.zip |
ALSA: isa: Move snd_legacy_find_free_ioport to initval.h
Move snd_legacy_find_free_ioport() function back to initval.h as it is used
by two drivers.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/initval.h')
-rw-r--r-- | include/sound/initval.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/sound/initval.h b/include/sound/initval.h index f99a0d2ddfe7..ac62c67e6f42 100644 --- a/include/sound/initval.h +++ b/include/sound/initval.h @@ -50,6 +50,20 @@ #define SNDRV_DEFAULT_DMA_SIZE { [0 ... (SNDRV_CARDS-1)] = SNDRV_AUTO_DMA_SIZE } #define SNDRV_DEFAULT_PTR SNDRV_DEFAULT_STR +#ifdef SNDRV_LEGACY_FIND_FREE_IOPORT +static long snd_legacy_find_free_ioport(long *port_table, long size) +{ + while (*port_table != -1) { + if (request_region(*port_table, size, "ALSA test")) { + release_region(*port_table, size); + return *port_table; + } + port_table++; + } + return -1; +} +#endif + #ifdef SNDRV_LEGACY_FIND_FREE_IRQ #include <linux/interrupt.h> |