msm: clock: Clean up handoff function return values

The intended interpretation of handoff function return value was for 1 or
true to indicate that a handoff of a running clock had been successfully
performed, and 0 or false to indicate that it had not (either because the
clock was off or the rate was invalid).

Some handoff functions added later, however, used the value of 0 to mean
something else: that the handoff of some state was successful, but the
enabled/disabled state of the clock was not checked.

The vague definitions for the return codes of these functions make
it difficult to understand their intended behaviour. Address this by
using an enum of return codes so that their intentions are obvious.
Also update the functions that did not check enabled/disabled state
to do so and return meaningful values.

Change-Id: Iebf4c9e4b358379f7f048a720888b299dc9ee8e5
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 1776c12..cbb86a7 100644
--- a/arch/arm/mach-msm/clock.c
+++ b/arch/arm/mach-msm/clock.c
@@ -412,7 +412,7 @@
 		struct clk *parent = clk_get_parent(clk);
 		clk_set_parent(clk, parent);
 		if (clk->ops->handoff && !(clk->flags & CLKFLAG_HANDOFF_RATE)) {
-			if (clk->ops->handoff(clk)) {
+			if (clk->ops->handoff(clk) == HANDOFF_ENABLED_CLK) {
 				clk->flags |= CLKFLAG_HANDOFF_RATE;
 				clk_prepare_enable(clk);
 			}