msm: clock: Fix clk_set_parent()
- Update the clk->parent field when the operation succeeds.
- Grab the prepare lock when changing the parent. This is necessary to
avoid race conditions between clk_set_parent() and clk_prepare(),
clk_unprepare() and clk_set_rate(). Luckily, as of now, only the measure
clock supports clk_set_parent(). So, this is not a real issue in a
production device. Each set_parent op still needs to deal with
grabbing/releasing the enable lock at the right time.
- If a clock doesn't support clk_set_parent() return an error instead of
silently failing.
Change-Id: I5fdd6a7bb44bb924dc9aabd7119a03520617e3d1
Signed-off-by:
Saravana Kannan <skannan@codeaurora.org>
Loading
Please register or sign in to comment