serial: imx: convert to clk_prepare/clk_unprepare
Subsystems (2)
PATCH 1/1 serial: imx: convert to clk_prepare/clk_unprepare
Signed-off-by Richard Zhao <[email protected]>
--- drivers/tty/serial/imx.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/tty/serial/imx.c +3 -0
@@ -1390,6 +1390,7 @@ static int serial_imx_probe(struct platform_device *pdev) ret =PTR_ERR (sport->clk); goto unmap; } +clk_prepare (sport->clk);clk_enable (sport->clk); sport->port.uartclk =clk_get_rate (sport->clk);
@@ -1415,6 +1416,7 @@ deinit: clkput:clk_put (sport->clk);clk_disable (sport->clk); +clk_unprepare (sport->clk); unmap:iounmap (sport->port.membase); free:
@@ -1438,6 +1440,7 @@ static int serial_imx_remove(struct platform_device *pdev) }clk_disable (sport->clk); +clk_unprepare (sport->clk);if (pdata && pdata->exit) pdata->exit (pdev);
Signature · 1 line
1.7.5.4
Sascha Hauer
maintainerPATCH 1/1 serial: imx: convert to clk_prepare/clk_unprepare
Quoted 18 lines · Richard Zhao
Signed-off-by Richard Zhao <[email protected]>--- drivers/tty/serial/imx.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)drivers/tty/serial/imx.c +1
-0@@ -1390,6 +1390,7 @@ static int serial_imx_probe(struct platform_device *pdev) ret =PTR_ERR (sport->clk); goto unmap; } +clk_prepare (sport->clk);clk_enable (sport->clk); sport->port.uartclk =clk_get_rate (sport->clk);
drivers/tty/serial/imx.c deinit: · line 1419
Quoted 4 lines
drivers/tty/serial/imx.c +1
-0@@ -1415,6 +1416,7 @@ deinit: clkput:clk_put (sport->clk);clk_disable (sport->clk); +clk_unprepare (sport->clk);
Ouch, clk_put before clk_disable? This is is bug. Care to fix it?
drivers/tty/serial/imx.c static int serial_imx_remove(struct platform_device *pdev) · line 1444
Quoted 9 lines
drivers/tty/serial/imx.c +1
-0unmap:iounmap (sport->port.membase); free:@@ -1438,6 +1440,7 @@ static int serial_imx_remove(struct platform_device *pdev) }clk_disable (sport->clk); +clk_unprepare (sport->clk);
Here clk_put is missing, another bug.
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
PATCH 1/1 serial: imx: convert to clk_prepare/clk_unprepare
Quoted 17 lines · Sascha Hauer
Quoted 16 lines · Richard Zhao
Signed-off-by Richard Zhao <[email protected]>--- drivers/tty/serial/imx.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)drivers/tty/serial/imx.c +1
-0@@ -1390,6 +1390,7 @@ static int serial_imx_probe(struct platform_device *pdev) ret =PTR_ERR (sport->clk); goto unmap; } +clk_prepare (sport->clk);clk_enable (sport->clk);
Quoted 8 lines
drivers/tty/serial/imx.c deinit: · line 1419
Quoted 6 lines
drivers/tty/serial/imx.c +1
-0sport->port.uartclk =clk_get_rate (sport->clk);@@ -1415,6 +1416,7 @@ deinit: clkput:clk_put (sport->clk);clk_disable (sport->clk); +clk_unprepare (sport->clk);Ouch,
clk_putbeforeclk_disable? This is is bug. Care to fix it?
hmm.. I'll fix the two bugs in my next version patch.
Quoted 26 lines
drivers/tty/serial/imx.c static int serial_imx_remove(struct platform_device *pdev) · line 1444
Quoted 10 lines
drivers/tty/serial/imx.c +1
-0unmap:iounmap (sport->port.membase); free:@@ -1438,6 +1440,7 @@ static int serial_imx_remove(struct platform_device *pdev) }clk_disable (sport->clk); +clk_unprepare (sport->clk);Here
clk_putis missing, another bug.Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel