Commit 5db496b9 authored by Peter Hurley's avatar Peter Hurley Committed by Greg Kroah-Hartman

serial: 8250: Simplify capabilities reset at port unregister

Since uart->port.type has just reset to PORT_UNKNOWN, capabilities
are reset to uart_config[PORT_UNKNOWN].flags, which is 0.

Removes unnecessary dependency on uart_config[].
Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e6e98cef
...@@ -3747,7 +3747,7 @@ void serial8250_unregister_port(int line) ...@@ -3747,7 +3747,7 @@ void serial8250_unregister_port(int line)
uart->port.flags &= ~UPF_BOOT_AUTOCONF; uart->port.flags &= ~UPF_BOOT_AUTOCONF;
uart->port.type = PORT_UNKNOWN; uart->port.type = PORT_UNKNOWN;
uart->port.dev = &serial8250_isa_devs->dev; uart->port.dev = &serial8250_isa_devs->dev;
uart->capabilities = uart_config[uart->port.type].flags; uart->capabilities = 0;
uart_add_one_port(&serial8250_reg, &uart->port); uart_add_one_port(&serial8250_reg, &uart->port);
} else { } else {
uart->port.dev = NULL; uart->port.dev = NULL;
......
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