Update of /cvsroot/alsa/alsa-kernel/drivers/mpu401 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12343
Modified Files: mpu401.c Log Message: use global variable to count cards Index: mpu401.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/drivers/mpu401/mpu401.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- mpu401.c 16 Mar 2004 11:54:53 -0000 1.15 +++ mpu401.c 16 Mar 2004 12:16:10 -0000 1.16 @@ -87,6 +87,7 @@ #endif static snd_card_t *snd_mpu401_legacy_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; +static int cards; #ifdef USE_ACPI_PNP @@ -206,6 +207,7 @@ else #endif snd_mpu401_legacy_cards[dev] = card; + ++cards; return 0; } @@ -259,15 +261,11 @@ static int __init alsa_card_mpu401_init(void) { - int dev, cards; + int dev; #ifdef USE_ACPI_PNP - cards = acpi_bus_register_driver(&snd_mpu401_acpi_driver); - if (cards >= 0) + if (acpi_bus_register_driver(&snd_mpu401_acpi_driver) >= 0) acpi_driver_registered = 1; - else -#else - cards = 0; #endif for (dev = 0; dev < SNDRV_CARDS; dev++) { if (!enable[dev]) @@ -276,8 +274,7 @@ if (acpipnp[dev] && acpi_driver_registered) continue; #endif - if (snd_card_mpu401_probe(dev, NULL) >= 0) - cards++; + snd_card_mpu401_probe(dev, NULL); } if (!cards) { #ifdef MODULE ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog