Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / drivers / ata / libata-sff.c
index f8380ce..b1b926c 100644 (file)
@@ -2447,13 +2447,18 @@ int ata_pci_sff_activate_host(struct ata_host *host,
                return -ENOMEM;
 
        if (!legacy_mode && pdev->irq) {
+               int i;
+
                rc = devm_request_irq(dev, pdev->irq, irq_handler,
                                      IRQF_SHARED, drv_name, host);
                if (rc)
                        goto out;
 
-               ata_port_desc(host->ports[0], "irq %d", pdev->irq);
-               ata_port_desc(host->ports[1], "irq %d", pdev->irq);
+               for (i = 0; i < 2; i++) {
+                       if (ata_port_is_dummy(host->ports[i]))
+                               continue;
+                       ata_port_desc(host->ports[i], "irq %d", pdev->irq);
+               }
        } else if (legacy_mode) {
                if (!ata_port_is_dummy(host->ports[0])) {
                        rc = devm_request_irq(dev, ATA_PRIMARY_IRQ(pdev),