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 / serial-u16550.c
index c01b4c5..52afb4b 100644 (file)
@@ -795,7 +795,7 @@ static int __init snd_uart16550_create(struct snd_card *card,
 
        if (irq >= 0 && irq != SNDRV_AUTO_IRQ) {
                if (request_irq(irq, snd_uart16550_interrupt,
-                               SA_INTERRUPT, "Serial MIDI", (void *) uart)) {
+                               IRQF_DISABLED, "Serial MIDI", (void *) uart)) {
                        snd_printk("irq %d busy. Using Polling.\n", irq);
                } else {
                        uart->irq = irq;
@@ -998,6 +998,10 @@ static int __init alsa_card_serial_init(void)
                                                         i, NULL, 0);
                if (IS_ERR(device))
                        continue;
+               if (!platform_get_drvdata(device)) {
+                       platform_device_unregister(device);
+                       continue;
+               }
                devices[i] = device;
                cards++;
        }