From: Laurent Pinchart Date: Thu, 28 Nov 2013 15:20:04 +0000 (+0100) Subject: sh-pfc: sh7372: Fix pin bias setup X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=71493de7e55af589dbe76ce78ae2b762f9cc6f27;p=deliverable%2Flinux.git 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 Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7372.c b/drivers/pinctrl/sh-pfc/pfc-sh7372.c index 70b522d34821..cc097b693820 100644 --- a/drivers/pinctrl/sh-pfc/pfc-sh7372.c +++ b/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 = &sh7372_portcr_offsets[i]; - if (i <= group->end_pin) + if (pin <= group->end_pin) return pfc->window->virt + group->offset + pin; }