diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-09 06:23:33 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-09 06:23:33 +0200 |
commit | 1ba7055af26f008e8fc8dab9dcb1701534afbe16 (patch) | |
tree | 6156556f56eba8ebc6d50639fbc8329f5ad078a2 /drivers/tty/serial/samsung.c | |
parent | serial: imx: Improve Kconfig text (diff) | |
parent | Linux 3.10-rc5 (diff) | |
download | linux-1ba7055af26f008e8fc8dab9dcb1701534afbe16.tar.xz linux-1ba7055af26f008e8fc8dab9dcb1701534afbe16.zip |
Merge 3.10-rc5 into tty-next
Diffstat (limited to 'drivers/tty/serial/samsung.c')
-rw-r--r-- | drivers/tty/serial/samsung.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index 1c2b8c31fde1..81ebc86a9e23 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -1166,6 +1166,18 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, ourport->tx_irq = ret; ourport->clk = clk_get(&platdev->dev, "uart"); + if (IS_ERR(ourport->clk)) { + pr_err("%s: Controller clock not found\n", + dev_name(&platdev->dev)); + return PTR_ERR(ourport->clk); + } + + ret = clk_prepare_enable(ourport->clk); + if (ret) { + pr_err("uart: clock failed to prepare+enable: %d\n", ret); + clk_put(ourport->clk); + return ret; + } /* Keep all interrupts masked and cleared */ if (s3c24xx_serial_has_interrupt_mask(port)) { @@ -1180,6 +1192,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, /* reset the fifos (and setup the uart) */ s3c24xx_serial_resetport(port, cfg); + clk_disable_unprepare(ourport->clk); return 0; } |