diff options
author | Axel Lin <axel.lin@ingics.com> | 2015-06-27 21:45:08 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-07-23 18:25:38 -0400 |
commit | d8c2c0d89205a3538c5fd77dc9d4767ee6bebc70 (patch) | |
tree | 59216a7a1c8e1bf0eaa3cd62b98c65b5fa384b35 | |
parent | 08b33249d89700ba555d4ab5cc88714192b8ee46 (diff) |
serial: etraxfs-uart: Fix release etraxfs_uart_ports
In probe, we use dev_id as array index of etraxfs_uart_ports and store the
index in port->line. So etraxfs_uart_ports[port->line] should be released
when unload the module.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Niklas Cassel <nks@flawful.org>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/etraxfs-uart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/etraxfs-uart.c b/drivers/tty/serial/etraxfs-uart.c index a57301a6fe42..679709f51fd4 100644 --- a/drivers/tty/serial/etraxfs-uart.c +++ b/drivers/tty/serial/etraxfs-uart.c | |||
@@ -950,7 +950,7 @@ static int etraxfs_uart_remove(struct platform_device *pdev) | |||
950 | 950 | ||
951 | port = platform_get_drvdata(pdev); | 951 | port = platform_get_drvdata(pdev); |
952 | uart_remove_one_port(&etraxfs_uart_driver, port); | 952 | uart_remove_one_port(&etraxfs_uart_driver, port); |
953 | etraxfs_uart_ports[pdev->id] = NULL; | 953 | etraxfs_uart_ports[port->line] = NULL; |
954 | 954 | ||
955 | return 0; | 955 | return 0; |
956 | } | 956 | } |