]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/serial/amba-pl011.c
[PATCH] md: avoid possible BUG_ON in md bitmap handling
[linux-2.6-omap-h63xx.git] / drivers / serial / amba-pl011.c
index d503625730df56dc4334868acba23a33d486e802..44639e71372a7eb08c209562e95374fe5d0fb22e 100644 (file)
@@ -412,8 +412,8 @@ static void pl011_shutdown(struct uart_port *port)
 }
 
 static void
-pl011_set_termios(struct uart_port *port, struct termios *termios,
-                    struct termios *old)
+pl011_set_termios(struct uart_port *port, struct ktermios *termios,
+                    struct ktermios *old)
 {
        unsigned int lcr_h, old_cr;
        unsigned long flags;
@@ -661,6 +661,8 @@ static int __init pl011_console_setup(struct console *co, char *options)
        if (co->index >= UART_NR)
                co->index = 0;
        uap = amba_ports[co->index];
+       if (!uap)
+               return -ENODEV;
 
        uap->port.uartclk = clk_get_rate(uap->clk);