From: Laurent Pinchart Date: Thu, 28 Nov 2013 15:20:03 +0000 (+0100) Subject: sh-pfc: r8a7740: Fix pin bias setup X-Git-Tag: firefly_0821_release~176^2~4830^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5d27619498ab468e8c7e67844c640ad0915e8d85;p=firefly-linux-kernel-4.4.55.git sh-pfc: r8a7740: 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 Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c index 009174d07767..bc5eb453a45c 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c @@ -3720,7 +3720,7 @@ static void __iomem *r8a7740_pinmux_portcr(struct sh_pfc *pfc, unsigned int pin) const struct r8a7740_portcr_group *group = &r8a7740_portcr_offsets[i]; - if (i <= group->end_pin) + if (pin <= group->end_pin) return pfc->window->virt + group->offset + pin; }