public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: spear: Fix the logic of setting reg in pmx_init_gpio_pingroup_addr
@ 2012-11-13  7:31 Axel Lin
  2012-11-15 11:06 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-11-13  7:31 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Viresh Kumar, spear-devel, linux-kernel

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

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/pinctrl/spear/pinctrl-spear.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/spear/pinctrl-spear.c b/drivers/pinctrl/spear/pinctrl-spear.c
index f9483ae..107780c 100644
--- a/drivers/pinctrl/spear/pinctrl-spear.c
+++ b/drivers/pinctrl/spear/pinctrl-spear.c
@@ -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;
 }
 
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-15 11:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-13  7:31 [PATCH] pinctrl: spear: Fix the logic of setting reg in pmx_init_gpio_pingroup_addr Axel Lin
2012-11-15 11:06 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox