clk: clk-fixed-factor: Clear OF_POPULATED flag in case of failure
authorRajan Vaja <rajan.vaja@xilinx.com>
Tue, 17 Jul 2018 13:17:00 +0000 (06:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Sep 2018 06:37:59 +0000 (08:37 +0200)
commit62e442fdbcb25ef7adbcad5145137806df327a3f
treef4b3ba3b10a2123a16f7f95ca3c4b6ac993b5ce7
parentd8e7792fae4f54cab45f9877ac3c19966e0f2ce3
clk: clk-fixed-factor: Clear OF_POPULATED flag in case of failure

[ Upstream commit f6dab4233d6b64d719109040503b567f71fbfa01 ]

Fixed factor clock has two initializations at of_clk_init() time
and during platform driver probe. Before of_clk_init() call,
node is marked as populated and so its probe never gets called.

During of_clk_init() fixed factor clock registration may fail if
any of its parent clock is not registered. In this case, it doesn't
get chance to retry registration from probe. Clear OF_POPULATED
flag if fixed factor clock registration fails so that clock
registration is attempted again from probe.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/clk-fixed-factor.c