[media] coda: request BIT processor interrupt by name
authorPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 5 Aug 2014 17:00:09 +0000 (14:00 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 21 Aug 2014 20:25:23 +0000 (15:25 -0500)
Request the main coda interrupt using its name, "bit", if available.
Fall back to requesting the first interrupt for backwards compatibility.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/coda/coda-common.c

index dc9740d0ea5efd003815dd7b5f9f7d1e93465f21..86fc527a77826ab4ff151eacd221b4cef97796c9 100644 (file)
@@ -1835,7 +1835,9 @@ static int coda_probe(struct platform_device *pdev)
                return PTR_ERR(dev->regs_base);
 
        /* IRQ */
-       irq = platform_get_irq(pdev, 0);
+       irq = platform_get_irq_byname(pdev, "bit");
+       if (irq < 0)
+               irq = platform_get_irq(pdev, 0);
        if (irq < 0) {
                dev_err(&pdev->dev, "failed to get irq resource\n");
                return irq;