8250: use correct value for PORT_BRCM_TRUMANAGE
[pandora-kernel.git] / drivers / tty / serial / 8250.c
index 90dad17..6748568 100644 (file)
@@ -2695,7 +2695,7 @@ serial8250_verify_port(struct uart_port *port, struct serial_struct *ser)
        if (ser->irq >= nr_irqs || ser->irq < 0 ||
            ser->baud_base < 9600 || ser->type < PORT_UNKNOWN ||
            ser->type >= ARRAY_SIZE(uart_config) || ser->type == PORT_CIRRUS ||
-           ser->type == PORT_STARTECH)
+           ser->type == PORT_STARTECH || uart_config[ser->type].name == NULL)
                return -EINVAL;
        return 0;
 }
@@ -2705,7 +2705,7 @@ serial8250_type(struct uart_port *port)
 {
        int type = port->type;
 
-       if (type >= ARRAY_SIZE(uart_config))
+       if (type >= ARRAY_SIZE(uart_config) || uart_config[type].name == NULL)
                type = 0;
        return uart_config[type].name;
 }