summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/sirfsoc_uart.c
diff options
context:
space:
mode:
authorQipan Li <Qipan.Li@csr.com>2015-04-20 10:10:23 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-06 22:27:00 +0200
commitadeede7319cb57e0709ffaebb761932915e46d9d (patch)
tree669efb3bbc82c3d658996310141436dbb5f3501e /drivers/tty/serial/sirfsoc_uart.c
parentRevert "serial: sirf: add a new uart type support" (diff)
downloadlinux-adeede7319cb57e0709ffaebb761932915e46d9d.tar.xz
linux-adeede7319cb57e0709ffaebb761932915e46d9d.zip
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>
Diffstat (limited to 'drivers/tty/serial/sirfsoc_uart.c')
-rw-r--r--drivers/tty/serial/sirfsoc_uart.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/tty/serial/sirfsoc_uart.c b/drivers/tty/serial/sirfsoc_uart.c
index 8081cdba8778..247faed40e37 100644
--- a/drivers/tty/serial/sirfsoc_uart.c
+++ b/drivers/tty/serial/sirfsoc_uart.c
@@ -1378,7 +1378,7 @@ usp_no_flow_control:
}
port->irq = res->start;
- sirfport->clk = clk_get(&pdev->dev, NULL);
+ sirfport->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(sirfport->clk)) {
ret = PTR_ERR(sirfport->clk);
goto err;
@@ -1392,7 +1392,7 @@ usp_no_flow_control:
ret = uart_add_one_port(&sirfsoc_uart_drv, port);
if (ret != 0) {
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");
@@ -1421,8 +1421,6 @@ alloc_coherent_err:
sirfport->rx_dma_items[j].xmit.buf,
sirfport->rx_dma_items[j].dma_addr);
dma_release_channel(sirfport->rx_dma_chan);
-port_err:
- clk_put(sirfport->clk);
err:
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 uart_port *port = &sirfport->port;
- clk_put(sirfport->clk);
uart_remove_one_port(&sirfsoc_uart_drv, port);
if (sirfport->rx_dma_chan) {
int i;