[ALSA STABLE 1/3] a few more -- fix the "enable" module parameter behaviour

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Takashi.

The !enable[i] patch is also applicable to sound/drivers. This gets them
all.

  sound/drivers/dummy.c         |    4 +++-
  sound/drivers/mpu401/mpu401.c |    4 +++-
  sound/drivers/serial-u16550.c |    4 +++-
  sound/drivers/virmidi.c       |    4 +++-
  4 files changed, 12 insertions(+), 4 deletions(-)

Signed-off-by: Rene Herman <[email protected]>


Index: local/sound/drivers/dummy.c
===================================================================
--- local.orig/sound/drivers/dummy.c	2006-03-20 06:53:29.000000000 +0100
+++ local/sound/drivers/dummy.c	2006-04-13 03:02:43.000000000 +0200
@@ -669,8 +669,10 @@ static int __init alsa_card_dummy_init(v
 		return err;
 
 	cards = 0;
-	for (i = 0; i < SNDRV_CARDS && enable[i]; i++) {
+	for (i = 0; i < SNDRV_CARDS; i++) {
 		struct platform_device *device;
+		if (!enable[i])
+			continue;
 		device = platform_device_register_simple(SND_DUMMY_DRIVER,
 							 i, NULL, 0);
 		if (IS_ERR(device)) {
Index: local/sound/drivers/mpu401/mpu401.c
===================================================================
--- local.orig/sound/drivers/mpu401/mpu401.c	2006-03-20 06:53:29.000000000 +0100
+++ local/sound/drivers/mpu401/mpu401.c	2006-04-13 03:03:18.000000000 +0200
@@ -240,8 +240,10 @@ static int __init alsa_card_mpu401_init(
 		return err;
 
 	devices = 0;
-	for (i = 0; i < SNDRV_CARDS && enable[i]; i++) {
+	for (i = 0; i < SNDRV_CARDS; i++) {
 		struct platform_device *device;
+		if (!enable[i])
+			continue;
 #ifdef CONFIG_PNP
 		if (pnp[i])
 			continue;
Index: local/sound/drivers/serial-u16550.c
===================================================================
--- local.orig/sound/drivers/serial-u16550.c	2006-03-20 06:53:29.000000000 +0100
+++ local/sound/drivers/serial-u16550.c	2006-04-13 03:03:50.000000000 +0200
@@ -989,8 +989,10 @@ static int __init alsa_card_serial_init(
 		return err;
 
 	cards = 0;
-	for (i = 0; i < SNDRV_CARDS && enable[i]; i++) {
+	for (i = 0; i < SNDRV_CARDS; i++) {
 		struct platform_device *device;
+		if (!enable[i])
+			continue;
 		device = platform_device_register_simple(SND_SERIAL_DRIVER,
 							 i, NULL, 0);
 		if (IS_ERR(device)) {
Index: local/sound/drivers/virmidi.c
===================================================================
--- local.orig/sound/drivers/virmidi.c	2006-03-20 06:53:29.000000000 +0100
+++ local/sound/drivers/virmidi.c	2006-04-13 03:04:17.000000000 +0200
@@ -163,8 +163,10 @@ static int __init alsa_card_virmidi_init
 		return err;
 
 	cards = 0;
-	for (i = 0; i < SNDRV_CARDS && enable[i]; i++) {
+	for (i = 0; i < SNDRV_CARDS; i++) {
 		struct platform_device *device;
+		if (!enable[i])
+			continue;
 		device = platform_device_register_simple(SND_VIRMIDI_DRIVER,
 							 i, NULL, 0);
 		if (IS_ERR(device)) {


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux