mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
[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>
This commit is contained in:
parent
1a56f8d662
commit
8278ca8feb
@ -669,8 +669,10 @@ static int __init alsa_card_dummy_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_DUMMY_DRIVER,
|
||||
i, NULL, 0);
|
||||
if (IS_ERR(device)) {
|
||||
|
@ -240,8 +240,10 @@ static int __init alsa_card_mpu401_init(void)
|
||||
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;
|
||||
|
@ -989,8 +989,10 @@ static int __init alsa_card_serial_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_SERIAL_DRIVER,
|
||||
i, NULL, 0);
|
||||
if (IS_ERR(device)) {
|
||||
|
@ -163,8 +163,10 @@ static int __init alsa_card_virmidi_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_VIRMIDI_DRIVER,
|
||||
i, NULL, 0);
|
||||
if (IS_ERR(device)) {
|
||||
|
@ -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)) {
|
||||
|
@ -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)) {
|
||||
|
@ -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);
|
||||
|
@ -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)) {
|
||||
|
@ -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);
|
||||
|
@ -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)) {
|
||||
|
@ -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)) {
|
||||
|
@ -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)) {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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)) {
|
||||
|
@ -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)) {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user