Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7a7e14f authored by Matt Schulte's avatar Matt Schulte Committed by Greg Kroah-Hartman
Browse files

serial: Optimization: check for presence of UPF_EXAR_EFR flag before serial_in



Optimization: check for presence of UPF_EXAR_EFR flag before serial_in

Signed-off-by: default avatarMatt Schulte <matts@commtech-fastcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d02f8155
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -911,9 +911,9 @@ static void autoconfig_16550a(struct uart_8250_port *up)
	 * found at offset 0x09. Instead check the Deice ID (DVID)
	 * found at offset 0x09. Instead check the Deice ID (DVID)
	 * register for a 2, 4 or 8 port UART.
	 * register for a 2, 4 or 8 port UART.
	 */
	 */
	if (up->port.flags & UPF_EXAR_EFR) {
		status1 = serial_in(up, UART_EXAR_DVID);
		status1 = serial_in(up, UART_EXAR_DVID);
		if (status1 == 0x82 || status1 == 0x84 || status1 == 0x88) {
		if (status1 == 0x82 || status1 == 0x84 || status1 == 0x88) {
		if (up->port.flags & UPF_EXAR_EFR) {
			DEBUG_AUTOCONF("Exar XR17V35x ");
			DEBUG_AUTOCONF("Exar XR17V35x ");
			up->port.type = PORT_XR17V35X;
			up->port.type = PORT_XR17V35X;
			up->capabilities |= UART_CAP_AFE | UART_CAP_EFR |
			up->capabilities |= UART_CAP_AFE | UART_CAP_EFR |