From: John Rigby Date: Wed, 23 May 2007 17:30:55 +0000 (-0600) Subject: [POWERPC] 52xx: Fix mpc52xx_uart_of_assign to use correct index X-Git-Tag: v2.6.24-rc1~1450^2~238 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af6a9aabc106b70ab03d6665c713bca3dd3cb195;p=linux-2.6 [POWERPC] 52xx: Fix mpc52xx_uart_of_assign to use correct index Use idx as index into mpc52xx_uart_nodes instead of i Signed-off-by: John Rigby Signed-off-by: Kumar Gala --- diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 35f8b86cc7..035cca0281 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