Skip to content

Commit

Permalink
sh-pfc: sh7372: Fix pin bias setup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Laurent Pinchart authored and linusw committed Dec 3, 2013
1 parent 5d27619 commit 71493de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pinctrl/sh-pfc/pfc-sh7372.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 71493de

Please sign in to comment.