libata-sff: prevent irq descriptions for dummy ports
authorJames Bottomley <James.Bottomley@suse.de>
Sun, 24 Apr 2011 19:31:33 +0000 (14:31 -0500)
committerJeff Garzik <jgarzik@pobox.com>
Sat, 14 May 2011 18:59:54 +0000 (14:59 -0400)
This is a cosmetic change to prevent libata-sff adding irq
descriptions to dummy ports, since the information, while largely
unused, is erroneous.

Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/ata/libata-sff.c

index f8380ce0f4d1d85e1eee7638e93a9b996885adce..b1b926c55a72c7db1f6ebe004a0d055d2c8ec4b3 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),