summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-11-28 16:20:04 +0100
committerLinus Walleij <linus.walleij@linaro.org>2013-12-03 10:38:41 +0100
commit71493de7e55af589dbe76ce78ae2b762f9cc6f27 (patch)
tree3b67589f46350c8f6484058fcf448c18c304ccc3 /drivers/pinctrl
parent5d27619498ab468e8c7e67844c640ad0915e8d85 (diff)
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>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7372.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7372.c b/drivers/pinctrl/sh-pfc/pfc-sh7372.c
index 70b522d3482..cc097b69382 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;
}