diff mbox series

thermal: rcar_thermal: fix duplicate IRQ request

Message ID 34a21e56-22b0-3603-1aba-0800aa02eff7@cogentembedded.com (mailing list archive)
State Accepted
Delegated to: Geert Uytterhoeven
Headers show
Series thermal: rcar_thermal: fix duplicate IRQ request | expand

Commit Message

Sergei Shtylyov Oct. 3, 2018, 8:47 p.m. UTC
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>

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

Comments

Geert Uytterhoeven Oct. 4, 2018, 7:15 a.m. UTC | #1
CC Kaneko-san,

On Wed, Oct 3, 2018 at 10:47 PM Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> 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>

Nice catch!

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

> --- linux.orig/drivers/thermal/rcar_thermal.c
> +++ 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) {


Gr{oetje,eeting}s,

                        Geert
Simon Horman Oct. 4, 2018, 10:02 a.m. UTC | #2
On Thu, Oct 04, 2018 at 09:15:57AM +0200, Geert Uytterhoeven wrote:
> CC Kaneko-san,
> 
> On Wed, Oct 3, 2018 at 10:47 PM Sergei Shtylyov
> <sergei.shtylyov@cogentembedded.com> wrote:
> > 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>
> 
> Nice catch!
> 
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Daniel Lezcano Oct. 4, 2018, 10:13 a.m. UTC | #3
On 03/10/2018 22:47, Sergei Shtylyov wrote:
> 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: Daniel Lezcano <daniel.lezcano@linaro.org>
diff mbox series

Patch

Index: linux/drivers/thermal/rcar_thermal.c
===================================================================
--- linux.orig/drivers/thermal/rcar_thermal.c
+++ 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) {