1
0
Fork 0

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 <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
hifive-unleashed-5.1
Laurent Pinchart 2013-11-28 16:20:03 +01:00 committed by Linus Walleij
parent a9e51fe5e6
commit 5d27619498
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}