Update of /cvsroot/alsa/alsa-kernel/drivers/mpu401 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv680/alsa-kernel/drivers/mpu401
Modified Files: mpu401.c Log Message: don't use acpi_disabled because it isn't exported in all archs Index: mpu401.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/drivers/mpu401/mpu401.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- mpu401.c 15 Mar 2004 08:07:51 -0000 1.13 +++ mpu401.c 16 Mar 2004 11:16:29 -0000 1.14 @@ -90,6 +90,8 @@ #ifdef USE_ACPI_PNP +static int acpi_driver_registered; + struct mpu401_resources { unsigned long port; int irq; @@ -257,28 +259,30 @@ static int __init alsa_card_mpu401_init(void) { - int dev, cards = 0; + int dev, cards; +#ifdef USE_ACPI_PNP + cards = acpi_bus_register_driver(&snd_mpu401_acpi_driver); + acpi_driver_registered = cards >= 0; +#else + cards = 0; +#endif for (dev = 0; dev < SNDRV_CARDS; dev++) { if (!enable[dev]) continue; #ifdef USE_ACPI_PNP - if (acpipnp[dev] && !acpi_disabled) + if (acpipnp[dev] && acpi_driver_registered) continue; #endif if (snd_card_mpu401_probe(dev, NULL) >= 0) cards++; } -#ifdef USE_ACPI_PNP - if (!acpi_disabled) - cards += acpi_bus_register_driver(&snd_mpu401_acpi_driver); -#endif if (!cards) { #ifdef MODULE printk(KERN_ERR "MPU-401 device not found or device busy\n"); #endif #ifdef USE_ACPI_PNP - if (!acpi_disabled) + if (acpi_driver_registered) acpi_bus_unregister_driver(&snd_mpu401_acpi_driver); #endif return -ENODEV; @@ -291,7 +295,7 @@ int idx; #ifdef USE_ACPI_PNP - if (!acpi_disabled) + if (acpi_driver_registered) acpi_bus_unregister_driver(&snd_mpu401_acpi_driver); #endif for (idx = 0; idx < SNDRV_CARDS; idx++) ------------------------------------------------------- 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