summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion5x
diff options
context:
space:
mode:
authorMike Rapoport <mike@compulab.co.il>2010-11-03 16:22:00 +0100
committerNicolas Pitre <nico@fluxnic.net>2010-11-05 18:34:29 +0100
commit7350f419724fd9472d3b5cc521538713f9797b62 (patch)
tree4e11c938ca198e5b23280d622993777016e9b55b /arch/arm/mach-orion5x
parent[ARM] TS-78xxx NAND resource type should be IORESOURCE_MEM (diff)
downloadlinux-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-orion5x')
-rw-r--r--arch/arm/mach-orion5x/mpp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm/mach-orion5x/mpp.c b/arch/arm/mach-orion5x/mpp.c
index bc4c3b9aaf83..db485d3b8144 100644
--- a/arch/arm/mach-orion5x/mpp.c
+++ b/arch/arm/mach-orion5x/mpp.c
@@ -127,7 +127,7 @@ void __init orion5x_mpp_conf(struct orion5x_mpp_mode *mode)
/* Initialize gpiolib. */
orion_gpio_init();
- while (mode->mpp >= 0) {
+ for ( ; mode->mpp >= 0; mode++) {
u32 *reg;
int num_type;
int shift;
@@ -160,8 +160,6 @@ void __init orion5x_mpp_conf(struct orion5x_mpp_mode *mode)
orion_gpio_set_unused(mode->mpp);
orion_gpio_set_valid(mode->mpp, !!(mode->type == MPP_GPIO));
-
- mode++;
}
writel(mpp_0_7_ctrl, MPP_0_7_CTRL);