diff options
-rw-r--r-- | drivers/clocksource/exynos_mct.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index 029f96ab131a..ff44082a0827 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c | |||
@@ -382,24 +382,28 @@ static void exynos4_mct_tick_start(unsigned long cycles, | |||
382 | static int exynos4_tick_set_next_event(unsigned long cycles, | 382 | static int exynos4_tick_set_next_event(unsigned long cycles, |
383 | struct clock_event_device *evt) | 383 | struct clock_event_device *evt) |
384 | { | 384 | { |
385 | struct mct_clock_event_device *mevt = this_cpu_ptr(&percpu_mct_tick); | 385 | struct mct_clock_event_device *mevt; |
386 | 386 | ||
387 | mevt = container_of(evt, struct mct_clock_event_device, evt); | ||
387 | exynos4_mct_tick_start(cycles, mevt); | 388 | exynos4_mct_tick_start(cycles, mevt); |
388 | |||
389 | return 0; | 389 | return 0; |
390 | } | 390 | } |
391 | 391 | ||
392 | static int set_state_shutdown(struct clock_event_device *evt) | 392 | static int set_state_shutdown(struct clock_event_device *evt) |
393 | { | 393 | { |
394 | exynos4_mct_tick_stop(this_cpu_ptr(&percpu_mct_tick)); | 394 | struct mct_clock_event_device *mevt; |
395 | |||
396 | mevt = container_of(evt, struct mct_clock_event_device, evt); | ||
397 | exynos4_mct_tick_stop(mevt); | ||
395 | return 0; | 398 | return 0; |
396 | } | 399 | } |
397 | 400 | ||
398 | static int set_state_periodic(struct clock_event_device *evt) | 401 | static int set_state_periodic(struct clock_event_device *evt) |
399 | { | 402 | { |
400 | struct mct_clock_event_device *mevt = this_cpu_ptr(&percpu_mct_tick); | 403 | struct mct_clock_event_device *mevt; |
401 | unsigned long cycles_per_jiffy; | 404 | unsigned long cycles_per_jiffy; |
402 | 405 | ||
406 | mevt = container_of(evt, struct mct_clock_event_device, evt); | ||
403 | cycles_per_jiffy = (((unsigned long long)NSEC_PER_SEC / HZ * evt->mult) | 407 | cycles_per_jiffy = (((unsigned long long)NSEC_PER_SEC / HZ * evt->mult) |
404 | >> evt->shift); | 408 | >> evt->shift); |
405 | exynos4_mct_tick_stop(mevt); | 409 | exynos4_mct_tick_stop(mevt); |