Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / sound / drivers / mpu401 / mpu401.c
index 77b0600..17cc105 100644 (file)
@@ -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);
@@ -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++;
        }