]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
thermal: rcar_thermal: fix duplicate IRQ request
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Wed, 3 Oct 2018 20:47:34 +0000 (23:47 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 Dec 2019 08:17:00 +0000 (09:17 +0100)
[ Upstream commit df016bbba63743bbef9ff5c6c282561211dd72cc ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/thermal/rcar_thermal.c

index 8df2ce94c28d86b80a337487e5a1c602fda2f4d7..edaa4058686b7001ebe0f2322c24e072d85aa8f7 100644 (file)
@@ -493,7 +493,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) {