]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
serial: xuartps: Fix cdns_uart_port[] definition.
authorThomas Betker <thomas.betker@rohde-schwarz.com>
Wed, 11 Mar 2015 21:39:26 +0000 (22:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 21:52:29 +0000 (22:52 +0100)
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 <thomas.betker@rohde-schwarz.com>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/xilinx_uartps.c

index b8fbd4767c17fac51cd4c18fb341c24a0464fdc3..b0c2862a3daf8e2549f764011423c913bd616b0c 100644 (file)
@@ -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