msm: timer: do not always clear msm_active_clock

If a timer is being shutdown and it is not the active
clock, the msm_active_clock for that CPU should not be
cleared.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c
index 5f5a49e..912ae6e 100644
--- a/arch/arm/mach-msm/timer.c
+++ b/arch/arm/mach-msm/timer.c
@@ -322,6 +322,7 @@
 			       struct clock_event_device *evt)
 {
 	struct msm_clock *clock;
+	struct msm_clock **cur_clock;
 	struct msm_clock_percpu_data *clock_state, *gpt_state;
 	unsigned long irq_flags;
 	struct irq_chip *chip;
@@ -354,7 +355,9 @@
 		break;
 	case CLOCK_EVT_MODE_UNUSED:
 	case CLOCK_EVT_MODE_SHUTDOWN:
-		get_cpu_var(msm_active_clock) = NULL;
+		cur_clock = &get_cpu_var(msm_active_clock);
+		if (*cur_clock == clock)
+			*cur_clock = NULL;
 		put_cpu_var(msm_active_clock);
 		clock_state->in_sync = 0;
 		clock_state->stopped = 1;