]> git.baikalelectronics.ru Git - kernel.git/commit
clk: Do a DT parent lookup even when index < 0
authorStephen Boyd <sboyd@kernel.org>
Fri, 14 Jun 2019 17:46:06 +0000 (10:46 -0700)
committerStephen Boyd <sboyd@kernel.org>
Mon, 17 Jun 2019 14:13:54 +0000 (07:13 -0700)
commitf0be122e46d01a0397728325dfa6611d148b2083
treeeedfdd9b952a89bacfcca319b9bffbd322d57bb9
parenta348d574f6c4e1626c2f3edfb75d435fd5c0d18e
clk: Do a DT parent lookup even when index < 0

We want to allow the parent lookup to happen even if the index is some
value less than 0. This may be the case if a clk provider only specifies
the .name member to match a string in the "clock-names" DT property. We
shouldn't require that the index be >= 0 to make this use case work.

Fixes: 7276de323b9c ("clk: Allow parents to be specified via clkspec index")
Reported-by: Alexandre Mergnat <amergnat@baylibre.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk.c