소스 검색

[SERIAL] Fix matching of MMIO ports

The function uart_match_port() incorrectly compares the ioremap'd
virtual addresses of ports instead of the physical address to find
duplicate ports for MMIO based UARTs. This fixes it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Benjamin Herrenschmidt 20 년 전
부모
커밋
1624f00334
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/serial/serial_core.c

+ 1 - 1
drivers/serial/serial_core.c

@@ -2307,7 +2307,7 @@ int uart_match_port(struct uart_port *port1, struct uart_port *port2)
 		return (port1->iobase == port2->iobase) &&
 		return (port1->iobase == port2->iobase) &&
 		       (port1->hub6   == port2->hub6);
 		       (port1->hub6   == port2->hub6);
 	case UPIO_MEM:
 	case UPIO_MEM:
-		return (port1->membase == port2->membase);
+		return (port1->mapbase == port2->mapbase);
 	}
 	}
 	return 0;
 	return 0;
 }
 }