Skip to content

Commit

Permalink
pinctrl: spear: Fix the logic of setting reg in pmx_init_gpio_pingrou…
Browse files Browse the repository at this point in the history
…p_addr

Current code does not work if count > 1, fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Axel Lin authored and Linus Walleij committed Nov 15, 2012
1 parent 8d1c6ef commit 4484d0b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/pinctrl/spear/pinctrl-spear.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ void __devinit
pmx_init_gpio_pingroup_addr(struct spear_gpio_pingroup *gpio_pingroup,
unsigned count, u16 reg)
{
int i = 0, j = 0;
int i, j;

for (; i < count; i++)
for (; j < gpio_pingroup[i].nmuxregs; j++)
for (i = 0; i < count; i++)
for (j = 0; j < gpio_pingroup[i].nmuxregs; j++)
gpio_pingroup[i].muxregs[j].reg = reg;
}

Expand Down

0 comments on commit 4484d0b

Please sign in to comment.