thermal: rcar_thermal: fix duplicate IRQ request
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Wed, 3 Oct 2018 20:47:34 +0000 (23:47 +0300)
committerEduardo Valentin <edubezval@gmail.com>
Thu, 25 Oct 2018 17:44:49 +0000 (10:44 -0700)
The driver on R8A77995 requests the same IRQ twice since
platform_get_resource() is always called for the 1st IRQ resource.

Fixes: 1969d9dc2079 ("thermal: rcar_thermal: add r8a77995 support")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/rcar_thermal.c

index e77e630..39366cf 100644 (file)
@@ -504,7 +504,7 @@ static int rcar_thermal_probe(struct platform_device *pdev)
        pm_runtime_get_sync(dev);
 
        for (i = 0; i < chip->nirqs; i++) {
-               irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+               irq = platform_get_resource(pdev, IORESOURCE_IRQ, i);
                if (!irq)
                        continue;
                if (!common->base) {