]> Git Repo - linux.git/commitdiff
clk: gpio: Really allow an optional clock= DT property
authorStephen Boyd <[email protected]>
Fri, 19 Feb 2016 03:07:44 +0000 (19:07 -0800)
committerStephen Boyd <[email protected]>
Fri, 19 Feb 2016 03:10:22 +0000 (19:10 -0800)
We mis-merged the original patch from Russell here and so the
patch went almost all the way, except that we still failed to
probe when there wasn't a clocks property in the DT node. Allow
that case by making a negative value from
of_clk_get_parent_count() into "no parents", like the original
patch did.

Fixes: 7ed88aa2efa5 ("clk: fix clk-gpio.c with optional clock= DT property")
Cc: Russell King <[email protected]>
Cc: Michael Turquette <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
drivers/clk/clk-gpio.c

index 19fed65587e8206c20f6ee13a1b736276e8922ae..7b09a265d79fc8595a31332ecd40480beaed7bc5 100644 (file)
@@ -289,7 +289,7 @@ static void __init of_gpio_clk_setup(struct device_node *node,
 
        num_parents = of_clk_get_parent_count(node);
        if (num_parents < 0)
-               return;
+               num_parents = 0;
 
        data = kzalloc(sizeof(*data), GFP_KERNEL);
        if (!data)
This page took 0.057041 seconds and 4 git commands to generate.