Skip to content

Commit 1104321

Browse files
mbgggregkh
authored andcommitted
serial: Delete dead code for CIR serial ports
Commit e4fda3a ("serial: don't register CIR serial ports") adds a check for PORT_8250_CIR to serial8250_register_8250_port(). But the code isn't needed as the function never takes the branch when the port is CIR serial port. This patch deletes the dead code. Signed-off-by: Matthias Brugger <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5194954 commit 1104321

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

drivers/tty/serial/8250/8250_core.c

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,24 +1043,13 @@ int serial8250_register_8250_port(struct uart_8250_port *up)
10431043
if (up->dl_write)
10441044
uart->dl_write = up->dl_write;
10451045

1046-
if (uart->port.type != PORT_8250_CIR) {
1047-
if (serial8250_isa_config != NULL)
1048-
serial8250_isa_config(0, &uart->port,
1049-
&uart->capabilities);
1050-
1051-
ret = uart_add_one_port(&serial8250_reg,
1052-
&uart->port);
1053-
if (ret == 0)
1054-
ret = uart->port.line;
1055-
} else {
1056-
dev_info(uart->port.dev,
1057-
"skipping CIR port at 0x%lx / 0x%llx, IRQ %d\n",
1058-
uart->port.iobase,
1059-
(unsigned long long)uart->port.mapbase,
1060-
uart->port.irq);
1046+
if (serial8250_isa_config != NULL)
1047+
serial8250_isa_config(0, &uart->port,
1048+
&uart->capabilities);
10611049

1062-
ret = 0;
1063-
}
1050+
ret = uart_add_one_port(&serial8250_reg, &uart->port);
1051+
if (ret == 0)
1052+
ret = uart->port.line;
10641053
}
10651054
mutex_unlock(&serial_mutex);
10661055

0 commit comments

Comments
 (0)