summaryrefslogtreecommitdiffstats
path: root/sound/isa
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-02-20 11:57:34 +0100
committerJaroslav Kysela <perex@suse.cz>2006-03-22 10:30:43 +0100
commit8278ca8feb2748cf02d756ac6c5b9ab2e047c84a (patch)
treea58ddfa8d7ac897c02e4ba3bda9b77e278348fbf /sound/isa
parent1a56f8d662ec7fc86f2c408d289fa07cdb781746 (diff)
[ALSA] Fix check of enable module option
Fix the check of enable module option in probe of platform_device drivers. It shouldn't break the loop but just ignore if enable[i] is false. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa')
-rw-r--r--sound/isa/ad1848/ad1848.c4
-rw-r--r--sound/isa/cs423x/cs4231.c4
-rw-r--r--sound/isa/cs423x/cs4236.c4
-rw-r--r--sound/isa/es1688/es1688.c4
-rw-r--r--sound/isa/es18xx.c4
-rw-r--r--sound/isa/gus/gusclassic.c4
-rw-r--r--sound/isa/gus/gusextreme.c4
-rw-r--r--sound/isa/gus/gusmax.c4
-rw-r--r--sound/isa/gus/interwave.c4
-rw-r--r--sound/isa/opl3sa2.c4
-rw-r--r--sound/isa/sb/sb16.c4
-rw-r--r--sound/isa/sb/sb8.c4
-rw-r--r--sound/isa/sgalaxy.c4
-rw-r--r--sound/isa/wavefront/wavefront.c4
14 files changed, 39 insertions, 17 deletions
diff --git a/sound/isa/ad1848/ad1848.c b/sound/isa/ad1848/ad1848.c
index e091bbeffd2..326a057f752 100644
--- a/sound/isa/ad1848/ad1848.c
+++ b/sound/isa/ad1848/ad1848.c
@@ -187,8 +187,10 @@ static int __init alsa_card_ad1848_init(void)
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_AD1848_DRIVER,
i, NULL, 0);
if (IS_ERR(device)) {
diff --git a/sound/isa/cs423x/cs4231.c b/sound/isa/cs423x/cs4231.c
index ab67b5c2590..a30dcd96252 100644
--- a/sound/isa/cs423x/cs4231.c
+++ b/sound/isa/cs423x/cs4231.c
@@ -203,8 +203,10 @@ static int __init alsa_card_cs4231_init(void)
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_CS4231_DRIVER,
i, NULL, 0);
if (IS_ERR(device)) {
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c
index 99a42138bea..4060918e032 100644
--- a/sound/isa/cs423x/cs4236.c
+++ b/sound/isa/cs423x/cs4236.c
@@ -771,9 +771,9 @@ static int __init alsa_card_cs423x_init(void)
if ((err = platform_driver_register(&cs423x_nonpnp_driver)) < 0)
return err;
- for (i = 0; i < SNDRV_CARDS && enable[i]; i++) {
+ for (i = 0; i < SNDRV_CARDS; i++) {
struct platform_device *device;
- if (is_isapnp_selected(i))
+ if (! enable[i] || is_isapnp_selected(i))
continue;
device = platform_device_register_simple(CS423X_DRIVER,
i, NULL, 0);
diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c
index 50d23cf3d7c..2b69fc82926 100644
--- a/sound/isa/es1688/es1688.c
+++ b/sound/isa/es1688/es1688.c
@@ -207,8 +207,10 @@ static int __init alsa_card_es1688_init(void)
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(ES1688_DRIVER,
i, NULL, 0);
if (IS_ERR(device)) {
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c
index 79785808dd6..bb709264216 100644
--- a/sound/isa/es18xx.c
+++ b/sound/isa/es18xx.c
@@ -2381,9 +2381,9 @@ static int __init alsa_card_es18xx_init(void)
if ((err = platform_driver_register(&snd_es18xx_nonpnp_driver)) < 0)
return err;
- for (i = 0; i < SNDRV_CARDS && enable[i]; i++) {
+ for (i = 0; i < SNDRV_CARDS; i++) {
struct platform_device *device;
- if (is_isapnp_selected(i))
+ if (! enable[i] || is_isapnp_selected(i))
continue;
device = platform_device_register_simple(ES18XX_DRIVER,
i, NULL, 0);
diff --git a/sound/isa/gus/gusclassic.c b/sound/isa/gus/gusclassic.c
index 91c219116d7..26dccfea243 100644
--- a/sound/isa/gus/gusclassic.c
+++ b/sound/isa/gus/gusclassic.c
@@ -247,8 +247,10 @@ static int __init alsa_card_gusclassic_init(void)
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(GUSCLASSIC_DRIVER,
i, NULL, 0);
if (IS_ERR(device)) {
diff --git a/sound/isa/gus/gusextreme.c b/sound/isa/gus/gusextreme.c
index 239f16e6b9e..31dc20501d0 100644
--- a/sound/isa/gus/gusextreme.c
+++ b/sound/isa/gus/gusextreme.c
@@ -357,8 +357,10 @@ static int __init alsa_card_gusextreme_init(void)
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(GUSEXTREME_DRIVER,
i, NULL, 0);
if (IS_ERR(device)) {
diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c
index d4d2b2a517d..cafb9b67fa7 100644
--- a/sound/isa/gus/gusmax.c
+++ b/sound/isa/gus/gusmax.c
@@ -384,8 +384,10 @@ static int __init alsa_card_gusmax_init(void)
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(GUSMAX_DRIVER,
i, NULL, 0);
if (IS_ERR(device)) {
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c
index 9838d992b10..2cacd0fa687 100644
--- a/sound/isa/gus/interwave.c
+++ b/sound/isa/gus/interwave.c
@@ -935,8 +935,10 @@ static int __init alsa_card_interwave_init(void)
if ((err = platform_driver_register(&snd_interwave_driver)) < 0)
return err;
- 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 (isapnp[i])
continue;
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c
index 9d843197850..56fcd8a946a 100644
--- a/sound/isa/opl3sa2.c
+++ b/sound/isa/opl3sa2.c
@@ -949,8 +949,10 @@ static int __init alsa_card_opl3sa2_init(void)
if ((err = platform_driver_register(&snd_opl3sa2_nonpnp_driver)) < 0)
return err;
- 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 (isapnp[i])
continue;
diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c
index 0667bd14ad6..5737ab76160 100644
--- a/sound/isa/sb/sb16.c
+++ b/sound/isa/sb/sb16.c
@@ -712,9 +712,9 @@ static int __init alsa_card_sb16_init(void)
if ((err = platform_driver_register(&snd_sb16_nonpnp_driver)) < 0)
return err;
- for (i = 0; i < SNDRV_CARDS && enable[i]; i++) {
+ for (i = 0; i < SNDRV_CARDS; i++) {
struct platform_device *device;
- if (is_isapnp_selected(i))
+ if (! enable[i] || is_isapnp_selected(i))
continue;
device = platform_device_register_simple(SND_SB16_DRIVER,
i, NULL, 0);
diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c
index 60ee79cd14a..3efa23d303c 100644
--- a/sound/isa/sb/sb8.c
+++ b/sound/isa/sb/sb8.c
@@ -258,8 +258,10 @@ static int __init alsa_card_sb8_init(void)
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_SB8_DRIVER,
i, NULL, 0);
if (IS_ERR(device)) {
diff --git a/sound/isa/sgalaxy.c b/sound/isa/sgalaxy.c
index 0dbbb35b242..a60e66afbf9 100644
--- a/sound/isa/sgalaxy.c
+++ b/sound/isa/sgalaxy.c
@@ -360,8 +360,10 @@ static int __init alsa_card_sgalaxy_init(void)
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_SGALAXY_DRIVER,
i, NULL, 0);
if (IS_ERR(device)) {
diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c
index fa3ab960de1..c0115bf9065 100644
--- a/sound/isa/wavefront/wavefront.c
+++ b/sound/isa/wavefront/wavefront.c
@@ -710,8 +710,10 @@ static int __init alsa_card_wavefront_init(void)
if ((err = platform_driver_register(&snd_wavefront_driver)) < 0)
return err;
- 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 (isapnp[i])
continue;