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.h b/arch/arm/mach-msm/clock.h
index a70dbd1..60be654 100644
--- a/arch/arm/mach-msm/clock.h
+++ b/arch/arm/mach-msm/clock.h
@@ -63,6 +63,12 @@
 		.lock = __SPIN_LOCK_UNLOCKED(lock) \
 	}
 
+enum handoff {
+	HANDOFF_ENABLED_CLK,
+	HANDOFF_DISABLED_CLK,
+	HANDOFF_UNKNOWN_RATE,
+};
+
 struct clk_ops {
 	int (*prepare)(struct clk *clk);
 	int (*enable)(struct clk *clk);
@@ -72,7 +78,7 @@
 	void (*enable_hwcg)(struct clk *clk);
 	void (*disable_hwcg)(struct clk *clk);
 	int (*in_hwcg_mode)(struct clk *clk);
-	int (*handoff)(struct clk *clk);
+	enum handoff (*handoff)(struct clk *clk);
 	int (*reset)(struct clk *clk, enum clk_reset_action action);
 	int (*set_rate)(struct clk *clk, unsigned long rate);
 	int (*set_max_rate)(struct clk *clk, unsigned long rate);