aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250/8250_pnp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/8250/8250_pnp.c')
-rw-r--r--drivers/tty/serial/8250/8250_pnp.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/8250/8250_pnp.c
index 35d9ab95c5cb..b3455a970a1d 100644
--- a/drivers/tty/serial/8250/8250_pnp.c
+++ b/drivers/tty/serial/8250/8250_pnp.c
@@ -429,6 +429,7 @@ serial_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
429{ 429{
430 struct uart_8250_port uart; 430 struct uart_8250_port uart;
431 int ret, line, flags = dev_id->driver_data; 431 int ret, line, flags = dev_id->driver_data;
432 struct resource *res = NULL;
432 433
433 if (flags & UNKNOWN_DEV) { 434 if (flags & UNKNOWN_DEV) {
434 ret = serial_pnp_guess_board(dev); 435 ret = serial_pnp_guess_board(dev);
@@ -439,11 +440,12 @@ serial_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
439 memset(&uart, 0, sizeof(uart)); 440 memset(&uart, 0, sizeof(uart));
440 if (pnp_irq_valid(dev, 0)) 441 if (pnp_irq_valid(dev, 0))
441 uart.port.irq = pnp_irq(dev, 0); 442 uart.port.irq = pnp_irq(dev, 0);
442 if ((flags & CIR_PORT) && pnp_port_valid(dev, 2)) { 443 if ((flags & CIR_PORT) && pnp_port_valid(dev, 2))
443 uart.port.iobase = pnp_port_start(dev, 2); 444 res = pnp_get_resource(dev, IORESOURCE_IO, 2);
444 uart.port.iotype = UPIO_PORT; 445 else if (pnp_port_valid(dev, 0))
445 } else if (pnp_port_valid(dev, 0)) { 446 res = pnp_get_resource(dev, IORESOURCE_IO, 0);
446 uart.port.iobase = pnp_port_start(dev, 0); 447 if (pnp_resource_enabled(res)) {
448 uart.port.iobase = res->start;
447 uart.port.iotype = UPIO_PORT; 449 uart.port.iotype = UPIO_PORT;
448 } else if (pnp_mem_valid(dev, 0)) { 450 } else if (pnp_mem_valid(dev, 0)) {
449 uart.port.mapbase = pnp_mem_start(dev, 0); 451 uart.port.mapbase = pnp_mem_start(dev, 0);