summaryrefslogtreecommitdiff
path: root/arch/arm/mach-kirkwood/mpp.c
diff options
context:
space:
mode:
authorMike Rapoport <mike@compulab.co.il>2010-11-03 17:22:00 +0200
committerNicolas Pitre <nico@fluxnic.net>2010-11-05 13:34:29 -0400
commit7350f419724fd9472d3b5cc521538713f9797b62 (patch)
tree4e11c938ca198e5b23280d622993777016e9b55b /arch/arm/mach-kirkwood/mpp.c
parent377304abefa208890dce5739e4f297c93240efb2 (diff)
ARM: orion5x/kirkwood/mv78xx0: fix MPP configuration corner cases
Wrong MPP configuration would cause <cpu>_mpp_conf loop infinitely because the mpp list iterator would not be incremented. Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Diffstat (limited to 'arch/arm/mach-kirkwood/mpp.c')
-rw-r--r--arch/arm/mach-kirkwood/mpp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm/mach-kirkwood/mpp.c b/arch/arm/mach-kirkwood/mpp.c
index 065187d177c6..27901f702feb 100644
--- a/arch/arm/mach-kirkwood/mpp.c
+++ b/arch/arm/mach-kirkwood/mpp.c
@@ -59,7 +59,7 @@ void __init kirkwood_mpp_conf(unsigned int *mpp_list)
}
printk("\n");
- while (*mpp_list) {
+ for ( ; *mpp_list; mpp_list++) {
unsigned int num = MPP_NUM(*mpp_list);
unsigned int sel = MPP_SEL(*mpp_list);
int shift, gpio_mode;
@@ -88,8 +88,6 @@ void __init kirkwood_mpp_conf(unsigned int *mpp_list)
if (sel != 0)
gpio_mode = 0;
orion_gpio_set_valid(num, gpio_mode);
-
- mpp_list++;
}
printk(KERN_DEBUG " final MPP regs:");