Skip to content

Commit

Permalink
serial: etraxfs-uart: Fix release etraxfs_uart_ports
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Axel Lin authored and Greg Kroah-Hartman committed Jul 23, 2015
1 parent 08b3324 commit d8c2c0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/etraxfs-uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ static int etraxfs_uart_remove(struct platform_device *pdev)

port = platform_get_drvdata(pdev);
uart_remove_one_port(&etraxfs_uart_driver, port);
etraxfs_uart_ports[pdev->id] = NULL;
etraxfs_uart_ports[port->line] = NULL;

return 0;
}
Expand Down

0 comments on commit d8c2c0d

Please sign in to comment.