diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2005-11-20 16:09:05 +0300 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 14:29:21 +0300 |
commit | d001544ded23ddb1116f945ccc2d89a7f98ab7e8 (patch) | |
tree | 721fbc6355acfb886817e2b120f198383c5e6ae6 /sound/core/sound_oss.c | |
parent | 204bdb1b50013c7aa3922d8b66df943123087bd8 (diff) | |
download | linux-d001544ded23ddb1116f945ccc2d89a7f98ab7e8.tar.xz |
[ALSA] dynamic minors (6/6): increase maximum number of sound cards
Modules: ALSA Core,Memalloc module,ALSA sequencer
With dynamic minor numbers, we can increase the number of sound cards.
This requires that the sequencer client numbers of some kernel drivers
are allocated dynamically, too.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/core/sound_oss.c')
-rw-r--r-- | sound/core/sound_oss.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c index b9e89cac4c5d..3ae1c0d7ffd0 100644 --- a/sound/core/sound_oss.c +++ b/sound/core/sound_oss.c @@ -105,6 +105,8 @@ int snd_register_oss_device(int type, struct snd_card *card, int dev, int register1 = -1, register2 = -1; struct device *carddev = NULL; + if (card && card->number >= 8) + return 0; /* ignore silently */ if (minor < 0) return minor; preg = kmalloc(sizeof(struct snd_minor), GFP_KERNEL); @@ -162,6 +164,8 @@ int snd_unregister_oss_device(int type, struct snd_card *card, int dev) int track2 = -1; struct snd_minor *mptr; + if (card && card->number >= 8) + return 0; if (minor < 0) return minor; down(&sound_oss_mutex); |