msm: clock: Move the common parts of the handoff code up to clock.c

This allows the clk_enable()/clk_disable() calls associated
with handoffs, as well as manipulation of CLKFLAG_HANDOFF_RATE,
to be contained entirely within clock.c instead of being spread
out in multiple SoC drivers.

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
diff --git a/arch/arm/mach-msm/clock.c b/arch/arm/mach-msm/clock.c
index 1e3c38b..58a64a3 100644
--- a/arch/arm/mach-msm/clock.c
+++ b/arch/arm/mach-msm/clock.c
@@ -199,8 +199,12 @@
 		struct clk *clk = clock_tbl[n].clk;
 		struct clk *parent = clk_get_parent(clk);
 		clk_set_parent(clk, parent);
-		if (clk->ops->handoff && !(clk->flags & CLKFLAG_HANDOFF_RATE))
-			clk->ops->handoff(clk);
+		if (clk->ops->handoff && !(clk->flags & CLKFLAG_HANDOFF_RATE)) {
+			if (clk->ops->handoff(clk)) {
+				clk->flags |= CLKFLAG_HANDOFF_RATE;
+				clk_enable(clk);
+			}
+		}
 	}
 
 	clkdev_add_table(clock_tbl, num_clocks);