clk: divider: fix initialization with parent_hw
authorMichael Tretter <m.tretter@pengutronix.de>
Thu, 21 Jan 2021 07:16:46 +0000 (08:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:38:06 +0000 (11:38 +0100)
commit5273b9ba3e9980d9a39a79d03c35efd22be50d50
tree60361e876cd1257869a1504a603894a1ec70e029
parentc10782b208297e8dff6c2ad10a8e6b575aa8eacd
clk: divider: fix initialization with parent_hw

[ Upstream commit 0225daea08141b1dff681502d5af70b71e8b11ec ]

If a driver registers a divider clock with a parent_hw instead of the
parent_name, the parent_hw is ignored and the clock does not have a
parent.

Fix this by initializing the parents the same way they are initialized
for clock gates.

Fixes: ff258817137a ("clk: divider: Add support for specifying parents via DT/pointers")
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/20210121071659.1226489-3-m.tretter@pengutronix.de
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/clk-divider.c