ARM: amba: make irq 0 invalid
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 18 Dec 2011 11:31:51 +0000 (11:31 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 25 Jan 2012 11:02:02 +0000 (11:02 +0000)
Fix core bus and MMCI such that irq 0 means that there is no IRQ
attached.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/amba/bus.c
drivers/mmc/host/mmci.c

index 82b65e1e12bf26aa490e77a44f9d20d71f5281b4..d15acbb4d59e5ff7734de34fedabb1759e5a4b5b 100644 (file)
@@ -564,9 +564,9 @@ int amba_device_add(struct amba_device *dev, struct resource *parent)
        if (ret)
                goto err_release;
 
-       if (dev->irq[0] != NO_IRQ)
+       if (dev->irq[0] && dev->irq[0] != NO_IRQ)
                ret = device_create_file(&dev->dev, &dev_attr_irq0);
-       if (ret == 0 && dev->irq[1] != NO_IRQ)
+       if (ret == 0 && dev->irq[1] && dev->irq[1] != NO_IRQ)
                ret = device_create_file(&dev->dev, &dev_attr_irq1);
        if (ret == 0)
                return ret;
index 0d955ffaf44e2c3ec5961f966687da3e675819d9..304f2f98b68023b175ad71df111c7541d40e5dc0 100644 (file)
@@ -1325,7 +1325,7 @@ static int __devinit mmci_probe(struct amba_device *dev,
        if (ret)
                goto unmap;
 
-       if (dev->irq[1] == NO_IRQ)
+       if (dev->irq[1] == NO_IRQ || !dev->irq[1])
                host->singleirq = true;
        else {
                ret = request_irq(dev->irq[1], mmci_pio_irq, IRQF_SHARED,