Skip to content

Commit

Permalink
serial: 8250: Simplify capabilities reset at port unregister
Browse files Browse the repository at this point in the history
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: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Peter Hurley authored and Greg Kroah-Hartman committed Mar 26, 2015
1 parent e6e98ce commit 5db496b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/8250/8250_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3747,7 +3747,7 @@ void serial8250_unregister_port(int line)
uart->port.flags &= ~UPF_BOOT_AUTOCONF;
uart->port.type = PORT_UNKNOWN;
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);
} else {
uart->port.dev = NULL;
Expand Down

0 comments on commit 5db496b

Please sign in to comment.