[PATCH 20/22] [POWERPC] 52xx: Fix mpc52xx_uart_of_assign to use correct index

Kumar Gala galak at kernel.crashing.org
Fri Sep 14 07:07:58 EST 2007


From: John Rigby <jrigby at freescale.com>

Use idx as index into mpc52xx_uart_nodes instead of i

Signed-off-by: John Rigby <jrigby at freescale.com>
Signed-off-by: Kumar Gala <galak at kernel.crashing.org>
---
 drivers/serial/mpc52xx_uart.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index 35f8b86..035cca0 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -1051,7 +1051,7 @@ mpc52xx_uart_of_assign(struct device_node *np, int idx)
 	/* If the slot is already occupied, then swap slots */
 	if (mpc52xx_uart_nodes[idx] && (free_idx != -1))
 		mpc52xx_uart_nodes[free_idx] = mpc52xx_uart_nodes[idx];
-	mpc52xx_uart_nodes[i] = np;
+	mpc52xx_uart_nodes[idx] = np;
 }
 
 static void
-- 
1.5.2.4




More information about the Linuxppc-dev mailing list