[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>
diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c
index b9e89ca..3ae1c0d 100644
--- a/sound/core/sound_oss.c
+++ b/sound/core/sound_oss.c
@@ -105,6 +105,8 @@
 	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 track2 = -1;
 	struct snd_minor *mptr;
 
+	if (card && card->number >= 8)
+		return 0;
 	if (minor < 0)
 		return minor;
 	down(&sound_oss_mutex);