aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorOndrej Zary <linux@rainbow-software.org>2012-08-01 10:05:39 -0400
committerTakashi Iwai <tiwai@suse.de>2012-08-03 06:57:44 -0400
commit988aec3de5f0fa848f26fbf64f9e83364d6b3c25 (patch)
tree44dba73a859c16b6cc8f14074bf8e793a781a82e /include/sound
parent0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (diff)
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')
-rw-r--r--include/sound/initval.h14
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 @@
50#define SNDRV_DEFAULT_DMA_SIZE { [0 ... (SNDRV_CARDS-1)] = SNDRV_AUTO_DMA_SIZE } 50#define SNDRV_DEFAULT_DMA_SIZE { [0 ... (SNDRV_CARDS-1)] = SNDRV_AUTO_DMA_SIZE }
51#define SNDRV_DEFAULT_PTR SNDRV_DEFAULT_STR 51#define SNDRV_DEFAULT_PTR SNDRV_DEFAULT_STR
52 52
53#ifdef SNDRV_LEGACY_FIND_FREE_IOPORT
54static long snd_legacy_find_free_ioport(long *port_table, long size)
55{
56 while (*port_table != -1) {
57 if (request_region(*port_table, size, "ALSA test")) {
58 release_region(*port_table, size);
59 return *port_table;
60 }
61 port_table++;
62 }
63 return -1;
64}
65#endif
66
53#ifdef SNDRV_LEGACY_FIND_FREE_IRQ 67#ifdef SNDRV_LEGACY_FIND_FREE_IRQ
54#include <linux/interrupt.h> 68#include <linux/interrupt.h>
55 69