Skip to contentSkip to conversation

thermal: rcar_thermal: fix duplicate IRQ request

PATCH In review Sergei Shtylyov 4 participants 4 messages Oct 4, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thermal: rcar_thermal: fix duplicate IRQ request

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")

---
This patch is against the 'master' branch of Zhang Rui's linux.git' repo.

 drivers/thermal/rcar_thermal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/rcar_thermal.c +1 -1
Index: linux/drivers/thermal/rcar_thermal.c
===================================================================
@@ -504,7 +504,7 @@ static int rcar_thermal_probe(struct pla
 	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) {
Reviewed-by on v1 1/1
#1 lore raw

CC Kaneko-san,

Quoted 5 lines · Sergei Shtylyov

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")

Nice catch!

drivers/thermal/rcar_thermal.c static int rcar_thermal_probe(struct pla · line 510

Quoted 11 lines
drivers/thermal/rcar_thermal.c +1 -1
@@ -504,7 +504,7 @@ static int rcar_thermal_probe(struct pla
        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) {

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Reviewed-by
#2 lore raw
Quoted 7 lines · Geert Uytterhoeven

CC Kaneko-san,

Quoted 3 lines · Sergei Shtylyov

The driver on R8A77995 requests the same IRQ twice since platform_get_resource() is always called for the 1st IRQ resource.

Quoted 6 lines
Quoted 2 lines
Fixes 1969d9dc2079 ("thermal: rcar_thermal: add r8a77995 support")

Nice catch!

Reviewed-by on v1 1/1
#3 lore raw
In reply to Sergei Shtylyov
Quoted 7 lines · Sergei Shtylyov

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")

---

Signature · 5 lines
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog