]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
serial: Optimization: check for presence of UPF_EXAR_EFR flag before serial_in
authorMatt Schulte <matts@commtech-fastcom.com>
Tue, 20 Nov 2012 17:23:56 +0000 (11:23 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Nov 2012 00:28:04 +0000 (16:28 -0800)
Optimization: check for presence of UPF_EXAR_EFR flag before serial_in

Signed-off-by: Matt Schulte <matts@commtech-fastcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250.c

index 3624df674a31125381079f132e23e6bebda72a35..39d970719f7db7274f6b269be65a307a100c8217 100644 (file)
@@ -911,9 +911,9 @@ static void autoconfig_16550a(struct uart_8250_port *up)
         * found at offset 0x09. Instead check the Deice ID (DVID)
         * register for a 2, 4 or 8 port UART.
         */
-       status1 = serial_in(up, UART_EXAR_DVID);
-       if (status1 == 0x82 || status1 == 0x84 || status1 == 0x88) {
-               if (up->port.flags & UPF_EXAR_EFR) {
+       if (up->port.flags & UPF_EXAR_EFR) {
+               status1 = serial_in(up, UART_EXAR_DVID);
+               if (status1 == 0x82 || status1 == 0x84 || status1 == 0x88) {
                        DEBUG_AUTOCONF("Exar XR17V35x ");
                        up->port.type = PORT_XR17V35X;
                        up->capabilities |= UART_CAP_AFE | UART_CAP_EFR |