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>
This commit is contained in:
parent
039e7ad892
commit
023f117c54
@ -564,9 +564,9 @@ int amba_device_add(struct amba_device *dev, struct resource *parent)
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto err_release;
|
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);
|
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);
|
ret = device_create_file(&dev->dev, &dev_attr_irq1);
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -1325,7 +1325,7 @@ static int __devinit mmci_probe(struct amba_device *dev,
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto unmap;
|
goto unmap;
|
||||||
|
|
||||||
if (dev->irq[1] == NO_IRQ)
|
if (dev->irq[1] == NO_IRQ || !dev->irq[1])
|
||||||
host->singleirq = true;
|
host->singleirq = true;
|
||||||
else {
|
else {
|
||||||
ret = request_irq(dev->irq[1], mmci_pio_irq, IRQF_SHARED,
|
ret = request_irq(dev->irq[1], mmci_pio_irq, IRQF_SHARED,
|
||||||
|
Loading…
Reference in New Issue
Block a user