From: Thomas Betker Date: Wed, 11 Mar 2015 21:39:26 +0000 (+0100) Subject: serial: xuartps: Fix cdns_uart_port[] definition. X-Git-Tag: v4.1-rc1~61^2~21 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6db6df0e4a1b913810fc9063bbb332476ce316b7;p=karo-tx-linux.git serial: xuartps: Fix cdns_uart_port[] definition. The code assumes that the array cdns_uart_port[] has dimension CDNS_UART_NR_PORTS, so let us define it this way. Signed-off-by: Thomas Betker Reviewed-by: Michal Simek Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index b8fbd4767c17..b0c2862a3daf 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1010,7 +1010,7 @@ static struct uart_ops cdns_uart_ops = { #endif }; -static struct uart_port cdns_uart_port[2]; +static struct uart_port cdns_uart_port[CDNS_UART_NR_PORTS]; /** * cdns_uart_get_port - Configure the port from platform device resource info