X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=sound%2Fdrivers%2Fmpu401%2Fmpu401.c;h=2de181ad0b0506719626a9f74396f45411f3785f;hb=2b29b13c5794f648cd5e839796496704d787f5a6;hp=77b06009735df818253aa6a70b39392e476bfc80;hpb=5b4b7a236e7787f16af4e15a6253d46d8e794be6;p=linux-2.6 diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c index 77b0600973..2de181ad0b 100644 --- a/sound/drivers/mpu401/mpu401.c +++ b/sound/drivers/mpu401/mpu401.c @@ -83,7 +83,7 @@ static int snd_mpu401_create(int dev, struct snd_card **rcard) if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, port[dev], 0, - irq[dev], irq[dev] >= 0 ? SA_INTERRUPT : 0, NULL)) < 0) { + irq[dev], irq[dev] >= 0 ? IRQF_DISABLED : 0, NULL)) < 0) { printk(KERN_ERR "MPU401 not detected at 0x%lx\n", port[dev]); goto _err; } @@ -160,8 +160,9 @@ static int __devinit snd_mpu401_pnp(int dev, struct pnp_dev *device, return -ENODEV; } if (pnp_port_len(device, 0) < IO_EXTENT) { - snd_printk(KERN_ERR "PnP port length is %ld, expected %d\n", - pnp_port_len(device, 0), IO_EXTENT); + snd_printk(KERN_ERR "PnP port length is %llu, expected %d\n", + (unsigned long long)pnp_port_len(device, 0), + IO_EXTENT); return -ENODEV; } port[dev] = pnp_port_start(device, 0); @@ -210,7 +211,7 @@ static void __devexit snd_mpu401_pnp_remove(struct pnp_dev *dev) struct snd_card *card = (struct snd_card *) pnp_get_drvdata(dev); snd_card_disconnect(card); - snd_card_free_in_thread(card); + snd_card_free_when_closed(card); } static struct pnp_driver snd_mpu401_pnp_driver = { @@ -253,6 +254,10 @@ static int __init alsa_card_mpu401_init(void) i, NULL, 0); if (IS_ERR(device)) continue; + if (!platform_get_drvdata(device)) { + platform_device_unregister(device); + continue; + } platform_devices[i] = device; snd_mpu401_devices++; }