clk: clk_set_parent() with current parent shouldn't fail
authorStephen Boyd <[email protected]>
Mon, 2 Feb 2015 22:11:25 +0000 (14:11 -0800)
committerStephen Boyd <[email protected]>
Thu, 12 Mar 2015 19:18:53 +0000 (12:18 -0700)
commitb61c43c09f5e2b9bf8f340034c5ef1db8c64efa5
treeb0aae827b8dd71fc4c268b49e0a43af906f2cfb6
parentdfc202ead3123988793ac1160849676000b77ee4
clk: clk_set_parent() with current parent shouldn't fail

If a driver calls clk_set_parent(clk, parent) and parent is the
current parent of clk we shouldn't fail in any case.
Unfortunately if clk is a read-only mux we return -ENOSYS
because we think we can't change the parent, except for in this
special case where we don't actually need to change the parent at
all. Return 0 in such a situation.

Signed-off-by: Stephen Boyd <[email protected]>
Acked-by: Philipp Zabel <[email protected]>
Signed-off-by: Michael Turquette <[email protected]>
drivers/clk/clk.c