Commit 9527b82a authored by Sean Young's avatar Sean Young Committed by Greg Kroah-Hartman

Revert "serial: Delete dead code for CIR serial ports"

This reverts commit 1104321a.

The code is not dead at all and breaks winbond-cir.

Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled
00:02: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
00:03: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a CIR port
lirc lirc0: lirc_dev: driver ir-lirc-codec (winbond-cir) registered at minor = 0
winbond-cir 00:03: Region 0x2f8-0x2ff already in use!
winbond-cir: probe of 00:03 failed with error -16
Signed-off-by: default avatarSean Young <sean@mess.org>
Reviewed-by: default avatarMatthias Brugger <mbrugger@suse.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 37ef38f3
...@@ -1043,13 +1043,24 @@ int serial8250_register_8250_port(struct uart_8250_port *up) ...@@ -1043,13 +1043,24 @@ int serial8250_register_8250_port(struct uart_8250_port *up)
if (up->dl_write) if (up->dl_write)
uart->dl_write = up->dl_write; uart->dl_write = up->dl_write;
if (serial8250_isa_config != NULL) if (uart->port.type != PORT_8250_CIR) {
serial8250_isa_config(0, &uart->port, if (serial8250_isa_config != NULL)
&uart->capabilities); serial8250_isa_config(0, &uart->port,
&uart->capabilities);
ret = uart_add_one_port(&serial8250_reg,
&uart->port);
if (ret == 0)
ret = uart->port.line;
} else {
dev_info(uart->port.dev,
"skipping CIR port at 0x%lx / 0x%llx, IRQ %d\n",
uart->port.iobase,
(unsigned long long)uart->port.mapbase,
uart->port.irq);
ret = uart_add_one_port(&serial8250_reg, &uart->port); ret = 0;
if (ret == 0) }
ret = uart->port.line;
} }
mutex_unlock(&serial_mutex); mutex_unlock(&serial_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment