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>
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;