Merge tag 'armsoc-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[cascardo/linux.git] / drivers / dma / dma-axi-dmac.c
index c346809..7f0b9aa 100644 (file)
@@ -270,6 +270,9 @@ static irqreturn_t axi_dmac_interrupt_handler(int irq, void *devid)
        unsigned int pending;
 
        pending = axi_dmac_read(dmac, AXI_DMAC_REG_IRQ_PENDING);
+       if (!pending)
+               return IRQ_NONE;
+
        axi_dmac_write(dmac, AXI_DMAC_REG_IRQ_PENDING, pending);
 
        spin_lock(&dmac->chan.vchan.lock);
@@ -579,7 +582,9 @@ static int axi_dmac_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        dmac->irq = platform_get_irq(pdev, 0);
-       if (dmac->irq <= 0)
+       if (dmac->irq < 0)
+               return dmac->irq;
+       if (dmac->irq == 0)
                return -EINVAL;
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -683,6 +688,7 @@ static const struct of_device_id axi_dmac_of_match_table[] = {
        { .compatible = "adi,axi-dmac-1.00.a" },
        { },
 };
+MODULE_DEVICE_TABLE(of, axi_dmac_of_match_table);
 
 static struct platform_driver axi_dmac_driver = {
        .driver = {