mirror of https://gitee.com/openkylin/linux.git
serial: sirf: move from clk_get to devm_clk_get
Signed-off-by: Qipan Li <Qipan.Li@csr.com> Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
4b8038dca0
commit
adeede7319
|
@ -1378,7 +1378,7 @@ static int sirfsoc_uart_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
port->irq = res->start;
|
port->irq = res->start;
|
||||||
|
|
||||||
sirfport->clk = clk_get(&pdev->dev, NULL);
|
sirfport->clk = devm_clk_get(&pdev->dev, NULL);
|
||||||
if (IS_ERR(sirfport->clk)) {
|
if (IS_ERR(sirfport->clk)) {
|
||||||
ret = PTR_ERR(sirfport->clk);
|
ret = PTR_ERR(sirfport->clk);
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -1392,7 +1392,7 @@ static int sirfsoc_uart_probe(struct platform_device *pdev)
|
||||||
ret = uart_add_one_port(&sirfsoc_uart_drv, port);
|
ret = uart_add_one_port(&sirfsoc_uart_drv, port);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
dev_err(&pdev->dev, "Cannot add UART port(%d).\n", pdev->id);
|
dev_err(&pdev->dev, "Cannot add UART port(%d).\n", pdev->id);
|
||||||
goto port_err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
sirfport->rx_dma_chan = dma_request_slave_channel(port->dev, "rx");
|
sirfport->rx_dma_chan = dma_request_slave_channel(port->dev, "rx");
|
||||||
|
@ -1421,8 +1421,6 @@ static int sirfsoc_uart_probe(struct platform_device *pdev)
|
||||||
sirfport->rx_dma_items[j].xmit.buf,
|
sirfport->rx_dma_items[j].xmit.buf,
|
||||||
sirfport->rx_dma_items[j].dma_addr);
|
sirfport->rx_dma_items[j].dma_addr);
|
||||||
dma_release_channel(sirfport->rx_dma_chan);
|
dma_release_channel(sirfport->rx_dma_chan);
|
||||||
port_err:
|
|
||||||
clk_put(sirfport->clk);
|
|
||||||
err:
|
err:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -1431,7 +1429,6 @@ static int sirfsoc_uart_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct sirfsoc_uart_port *sirfport = platform_get_drvdata(pdev);
|
struct sirfsoc_uart_port *sirfport = platform_get_drvdata(pdev);
|
||||||
struct uart_port *port = &sirfport->port;
|
struct uart_port *port = &sirfport->port;
|
||||||
clk_put(sirfport->clk);
|
|
||||||
uart_remove_one_port(&sirfsoc_uart_drv, port);
|
uart_remove_one_port(&sirfsoc_uart_drv, port);
|
||||||
if (sirfport->rx_dma_chan) {
|
if (sirfport->rx_dma_chan) {
|
||||||
int i;
|
int i;
|
||||||
|
|
Loading…
Reference in New Issue