Переглянути джерело

sh-pfc: sh7372: Fix pin bias setup

When computing the pin configuration register offset the bias setup code
erroneously compares the pin number range with the loop index instead of
the pin number. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Laurent Pinchart 12 роки тому
батько
коміт
71493de7e5
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      drivers/pinctrl/sh-pfc/pfc-sh7372.c

+ 1 - 1
drivers/pinctrl/sh-pfc/pfc-sh7372.c

@@ -2584,7 +2584,7 @@ static void __iomem *sh7372_pinmux_portcr(struct sh_pfc *pfc, unsigned int pin)
 		const struct sh7372_portcr_group *group =
 		const struct sh7372_portcr_group *group =
 			&sh7372_portcr_offsets[i];
 			&sh7372_portcr_offsets[i];
 
 
-		if (i <= group->end_pin)
+		if (pin <= group->end_pin)
 			return pfc->window->virt + group->offset + pin;
 			return pfc->window->virt + group->offset + pin;
 	}
 	}