clk: call the clock init() callback before any other ops callback
authorJerome Brunet <jbrunet@baylibre.com>
Wed, 14 Feb 2018 13:43:37 +0000 (14:43 +0100)
committerStephen Boyd <sboyd@kernel.org>
Mon, 12 Mar 2018 22:10:24 +0000 (15:10 -0700)
commit541debae0adf0bee96137724fa1ce81d3102d14c
treed183e7a729abf458d4155f99388483fc298e5208
parent77deb66d262f8512130ff75ec5ea8e31070b41ed
clk: call the clock init() callback before any other ops callback

Some clocks may need to initialize things, whatever it is, before
being able to properly operate. Move the .init() call before any
other callback, such recalc_rate() or get_phase(), so the clock
is properly setup before being used.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk.c