diff options
author | Mike Rapoport <mike@compulab.co.il> | 2010-11-03 16:22:00 +0100 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2010-11-05 18:34:29 +0100 |
commit | 7350f419724fd9472d3b5cc521538713f9797b62 (patch) | |
tree | 4e11c938ca198e5b23280d622993777016e9b55b /arch/arm/mach-kirkwood/mpp.c | |
parent | [ARM] TS-78xxx NAND resource type should be IORESOURCE_MEM (diff) | |
download | linux-7350f419724fd9472d3b5cc521538713f9797b62.tar.xz linux-7350f419724fd9472d3b5cc521538713f9797b62.zip |
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.c | 4 |
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:"); |