Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4462b4bb authored by Stephen Boyd's avatar Stephen Boyd
Browse files

clk: gpio: Really allow an optional clock= DT property



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: 7ed88aa2 ("clk: fix clk-gpio.c with optional clock= DT property")
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Michael Turquette <mturquette@baylibre.com>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent c430daf9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)