Skip to content

Commit

Permalink
tty: serial: bcm63xx: Add support for unnamed clock outputs from DT
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kevin Cernekee authored and Greg Kroah-Hartman committed Nov 6, 2014
1 parent c0ec3fd commit 048c1df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/tty/serial/bcm63xx_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 048c1df

Please sign in to comment.