diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-12-18 06:31:51 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-25 06:02:02 -0500 |
commit | 023f117c547719fbc087ad72276aec5a026370df (patch) | |
tree | 068c4cec712bbf881153505aaf7c194859cfc79d | |
parent | 039e7ad89211a63d98341e4add4fc6720f383c2a (diff) |
ARM: amba: make irq 0 invalid
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>
-rw-r--r-- | drivers/amba/bus.c | 4 | ||||
-rw-r--r-- | drivers/mmc/host/mmci.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index 82b65e1e12bf..d15acbb4d59e 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c | |||
@@ -564,9 +564,9 @@ int amba_device_add(struct amba_device *dev, struct resource *parent) | |||
564 | if (ret) | 564 | if (ret) |
565 | goto err_release; | 565 | goto err_release; |
566 | 566 | ||
567 | if (dev->irq[0] != NO_IRQ) | 567 | if (dev->irq[0] && dev->irq[0] != NO_IRQ) |
568 | ret = device_create_file(&dev->dev, &dev_attr_irq0); | 568 | ret = device_create_file(&dev->dev, &dev_attr_irq0); |
569 | if (ret == 0 && dev->irq[1] != NO_IRQ) | 569 | if (ret == 0 && dev->irq[1] && dev->irq[1] != NO_IRQ) |
570 | ret = device_create_file(&dev->dev, &dev_attr_irq1); | 570 | ret = device_create_file(&dev->dev, &dev_attr_irq1); |
571 | if (ret == 0) | 571 | if (ret == 0) |
572 | return ret; | 572 | return ret; |
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 0d955ffaf44e..304f2f98b680 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
@@ -1325,7 +1325,7 @@ static int __devinit mmci_probe(struct amba_device *dev, | |||
1325 | if (ret) | 1325 | if (ret) |
1326 | goto unmap; | 1326 | goto unmap; |
1327 | 1327 | ||
1328 | if (dev->irq[1] == NO_IRQ) | 1328 | if (dev->irq[1] == NO_IRQ || !dev->irq[1]) |
1329 | host->singleirq = true; | 1329 | host->singleirq = true; |
1330 | else { | 1330 | else { |
1331 | ret = request_irq(dev->irq[1], mmci_pio_irq, IRQF_SHARED, | 1331 | ret = request_irq(dev->irq[1], mmci_pio_irq, IRQF_SHARED, |