summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKevin Cernekee <cernekee@gmail.com>2014-10-21 15:22:58 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-06 14:57:23 -0800
commit048c1df7e22b2d40c639837440527ba43b6a591c (patch)
treef96619e84ff69e1f63ad7d21585686e3926b8de0 /drivers
parentc0ec3fd123e9e64e095fb221ace841e00c04e40b (diff)
downloadlinux-stable-048c1df7e22b2d40c639837440527ba43b6a591c.tar.gz
linux-stable-048c1df7e22b2d40c639837440527ba43b6a591c.tar.bz2
linux-stable-048c1df7e22b2d40c639837440527ba43b6a591c.zip
tty: serial: bcm63xx: Add support for unnamed clock outputs from DT
The original non-DT bcm63xx clk code ignores the struct device argument and looks up a global clock name. DT platforms, by contrast, often just use a phandle to reference a clock node with no "clock-output-names" property. Modify the UART driver to support both schemes. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/bcm63xx_uart.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c
index 231519022b73..de955732607d 100644
--- a/drivers/tty/serial/bcm63xx_uart.c
+++ b/drivers/tty/serial/bcm63xx_uart.c
@@ -824,7 +824,8 @@ static int bcm_uart_probe(struct platform_device *pdev)
if (!res_irq)
return -ENODEV;
- clk = clk_get(&pdev->dev, "periph");
+ clk = pdev->dev.of_node ? of_clk_get(pdev->dev.of_node, 0) :
+ clk_get(&pdev->dev, "periph");
if (IS_ERR(clk))
return -ENODEV;