提交 d8c2c0d8 编写于 作者: A Axel Lin 提交者: Greg Kroah-Hartman

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: NAxel Lin <axel.lin@ingics.com>
Acked-by: NNiklas Cassel <nks@flawful.org>
Acked-by: NJesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 08b33249
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册