[PATCH 2/3] Optimization: check for presence of UPF_EXAR_EFR flag before serial_in

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Optimization: check for presence of UPF_EXAR_EFR flag before serial_in

Signed-off-by: Matt Schulte <matts@xxxxxxxxxxxxxxxxxxxx>
---
Built against tty-next commit: 1e619a1bf9ac878e6a984e4e279ccf712a65bc23

This depends on my previous patch submission:
[PATCH v3] Add support for new devices: Exar's XR17V35x family of
multi-port PCIe UARTs

 drivers/tty/serial/8250/8250.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/8250/8250.c b/drivers/tty/serial/8250/8250.c
index 1cda869..336d17c 100644
--- a/drivers/tty/serial/8250/8250.c
+++ b/drivers/tty/serial/8250/8250.c
@@ -913,9 +913,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 |
-- 
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux