]> Pileus Git - ~andy/linux/commitdiff
serial: samsung: use clk_prepare_enable and clk_disable_unprepare
authorThomas Abraham <thomas.abraham@linaro.org>
Tue, 2 Oct 2012 22:40:04 +0000 (07:40 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Oct 2012 18:29:30 +0000 (11:29 -0700)
Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
calls as required by common clock framework.

Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/samsung.c

index 7f04717176aa42c8ba6232719903eb547e673df3..740458ca62cca5e82a8fc579e61d69ab52b0074c 100644 (file)
@@ -530,16 +530,16 @@ static void s3c24xx_serial_pm(struct uart_port *port, unsigned int level,
        switch (level) {
        case 3:
                if (!IS_ERR(ourport->baudclk))
-                       clk_disable(ourport->baudclk);
+                       clk_disable_unprepare(ourport->baudclk);
 
-               clk_disable(ourport->clk);
+               clk_disable_unprepare(ourport->clk);
                break;
 
        case 0:
-               clk_enable(ourport->clk);
+               clk_prepare_enable(ourport->clk);
 
                if (!IS_ERR(ourport->baudclk))
-                       clk_enable(ourport->baudclk);
+                       clk_prepare_enable(ourport->baudclk);
 
                break;
        default:
@@ -713,11 +713,11 @@ static void s3c24xx_serial_set_termios(struct uart_port *port,
                s3c24xx_serial_setsource(port, clk_sel);
 
                if (!IS_ERR(ourport->baudclk)) {
-                       clk_disable(ourport->baudclk);
+                       clk_disable_unprepare(ourport->baudclk);
                        ourport->baudclk = ERR_PTR(-EINVAL);
                }
 
-               clk_enable(clk);
+               clk_prepare_enable(clk);
 
                ourport->baudclk = clk;
                ourport->baudclk_rate = clk ? clk_get_rate(clk) : 0;
@@ -1287,9 +1287,9 @@ static int s3c24xx_serial_resume(struct device *dev)
        struct s3c24xx_uart_port *ourport = to_ourport(port);
 
        if (port) {
-               clk_enable(ourport->clk);
+               clk_prepare_enable(ourport->clk);
                s3c24xx_serial_resetport(port, s3c24xx_port_to_cfg(port));
-               clk_disable(ourport->clk);
+               clk_disable_unprepare(ourport->clk);
 
                uart_resume_port(&s3c24xx_uart_drv, port);
        }