summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/of_serial.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@linaro.org>2015-07-01 12:25:13 -0700
committerKevin Hilman <khilman@linaro.org>2015-07-01 12:25:13 -0700
commit593aae214240d44bdb8ae3ebf38451812a92b9a6 (patch)
treece6826b676473115c1de02760717628f4207f2e1 /drivers/tty/serial/of_serial.c
parentea21feb37e753213a093e1f77b2c05ce57997ccd (diff)
parent63e63a1981c7247fea41ce97b3144befc8f2fb7b (diff)
Merge tag 'omap-for-v4.2/wakeirq-drivers-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/late
Merge "omap generic wakeirq for v4.2 merge window" from Tony Lindgren: Omap driver changes for v4.2 to switch drivers over to Linux generic wake IRQ events for omap_hsmmc, 8250_omap and omap-serial drivers. The generic wake IRQs also fix issues that these drivers potentially have with IRQ re-entrancy at least for serial-omap. Note that because of dependencies and merge conflicts these are based on Rafael's pm-wakeirq and Greg's tty-next branches. * tag 'omap-for-v4.2/wakeirq-drivers-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (148 commits) serial: 8250_omap: Move wake-up interrupt to generic wakeirq serial: omap: Switch wake-up interrupt to generic wakeirq tty: move linux/gsmmux.h to uapi doc: dt: add documentation for nxp,lpc1850-uart serial: 8250: add LPC18xx/43xx UART driver serial: 8250_uniphier: add UniPhier serial driver serial: 8250_dw: support ACPI platforms with integrated DMA engine serial: of_serial: check the return value of clk_prepare_enable() serial: of_serial: use devm_clk_get() instead of clk_get() serial: earlycon: Add support for big-endian MMIO accesses serial: sirf: use hrtimer for data rx serial: sirf: correct the fifo empty_bit serial: sirf: fix system hung on console log output serial: 8250: remove return statements from void function sc16is7xx: use kworker for RS-485 configuration sc16is7xx: use kworker to update ier bits sc16is7xx: use kworker for md_proc sc16is7xx: move RTS delay to workqueue sc16is7xx: use kthread_worker for tx_work and irq sc16is7xx: use LSR_TEMT_BIT in .tx_empty() ...
Diffstat (limited to 'drivers/tty/serial/of_serial.c')
-rw-r--r--drivers/tty/serial/of_serial.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c
index 137381e649e5..6823df99bd76 100644
--- a/drivers/tty/serial/of_serial.c
+++ b/drivers/tty/serial/of_serial.c
@@ -67,14 +67,17 @@ static int of_platform_serial_setup(struct platform_device *ofdev,
if (of_property_read_u32(np, "clock-frequency", &clk)) {
/* Get clk rate through clk driver if present */
- info->clk = clk_get(&ofdev->dev, NULL);
+ info->clk = devm_clk_get(&ofdev->dev, NULL);
if (IS_ERR(info->clk)) {
dev_warn(&ofdev->dev,
"clk or clock-frequency not defined\n");
return PTR_ERR(info->clk);
}
- clk_prepare_enable(info->clk);
+ ret = clk_prepare_enable(info->clk);
+ if (ret < 0)
+ return ret;
+
clk = clk_get_rate(info->clk);
}
/* If current-speed was set, then try not to change it. */
@@ -188,7 +191,6 @@ static int of_platform_serial_probe(struct platform_device *ofdev)
{
struct uart_8250_port port8250;
memset(&port8250, 0, sizeof(port8250));
- port.type = port_type;
port8250.port = port;
if (port.fifosize)