diff options
author | Alexey Klimov <klimov.linux@gmail.com> | 2015-06-21 16:41:39 -0400 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2015-08-10 05:40:23 -0400 |
commit | 479a932982944786269296a31682e5642f87b89a (patch) | |
tree | deb1cc1b091f9e6a07fb1817f0f3cd9331474bad /drivers/clocksource/exynos_mct.c | |
parent | 02760b116c56376ad564e959f81835008848861d (diff) |
clockevents/drivers/exynos_mct: Remove unneeded container_of()
Patch removes unneeded container_of() macro in exynos4_local_timer_setup().
Instead let's pass mevt pointer to setup and stop functions from
exynos4_mct_cpu_notify() and let them get evt pointer.
Tested on odroid-xu3.
Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Diffstat (limited to 'drivers/clocksource/exynos_mct.c')
-rw-r--r-- | drivers/clocksource/exynos_mct.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index 9064ff743598..4d2330a92b27 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c | |||
@@ -442,13 +442,11 @@ static irqreturn_t exynos4_mct_tick_isr(int irq, void *dev_id) | |||
442 | return IRQ_HANDLED; | 442 | return IRQ_HANDLED; |
443 | } | 443 | } |
444 | 444 | ||
445 | static int exynos4_local_timer_setup(struct clock_event_device *evt) | 445 | static int exynos4_local_timer_setup(struct mct_clock_event_device *mevt) |
446 | { | 446 | { |
447 | struct mct_clock_event_device *mevt; | 447 | struct clock_event_device *evt = &mevt->evt; |
448 | unsigned int cpu = smp_processor_id(); | 448 | unsigned int cpu = smp_processor_id(); |
449 | 449 | ||
450 | mevt = container_of(evt, struct mct_clock_event_device, evt); | ||
451 | |||
452 | mevt->base = EXYNOS4_MCT_L_BASE(cpu); | 450 | mevt->base = EXYNOS4_MCT_L_BASE(cpu); |
453 | snprintf(mevt->name, sizeof(mevt->name), "mct_tick%d", cpu); | 451 | snprintf(mevt->name, sizeof(mevt->name), "mct_tick%d", cpu); |
454 | 452 | ||
@@ -477,8 +475,10 @@ static int exynos4_local_timer_setup(struct clock_event_device *evt) | |||
477 | return 0; | 475 | return 0; |
478 | } | 476 | } |
479 | 477 | ||
480 | static void exynos4_local_timer_stop(struct clock_event_device *evt) | 478 | static void exynos4_local_timer_stop(struct mct_clock_event_device *mevt) |
481 | { | 479 | { |
480 | struct clock_event_device *evt = &mevt->evt; | ||
481 | |||
482 | evt->set_mode(CLOCK_EVT_MODE_UNUSED, evt); | 482 | evt->set_mode(CLOCK_EVT_MODE_UNUSED, evt); |
483 | if (mct_int_type == MCT_INT_SPI) { | 483 | if (mct_int_type == MCT_INT_SPI) { |
484 | if (evt->irq != -1) | 484 | if (evt->irq != -1) |
@@ -500,11 +500,11 @@ static int exynos4_mct_cpu_notify(struct notifier_block *self, | |||
500 | switch (action & ~CPU_TASKS_FROZEN) { | 500 | switch (action & ~CPU_TASKS_FROZEN) { |
501 | case CPU_STARTING: | 501 | case CPU_STARTING: |
502 | mevt = this_cpu_ptr(&percpu_mct_tick); | 502 | mevt = this_cpu_ptr(&percpu_mct_tick); |
503 | exynos4_local_timer_setup(&mevt->evt); | 503 | exynos4_local_timer_setup(mevt); |
504 | break; | 504 | break; |
505 | case CPU_DYING: | 505 | case CPU_DYING: |
506 | mevt = this_cpu_ptr(&percpu_mct_tick); | 506 | mevt = this_cpu_ptr(&percpu_mct_tick); |
507 | exynos4_local_timer_stop(&mevt->evt); | 507 | exynos4_local_timer_stop(mevt); |
508 | break; | 508 | break; |
509 | } | 509 | } |
510 | 510 | ||
@@ -570,7 +570,7 @@ static void __init exynos4_timer_resources(struct device_node *np, void __iomem | |||
570 | goto out_irq; | 570 | goto out_irq; |
571 | 571 | ||
572 | /* Immediately configure the timer on the boot CPU */ | 572 | /* Immediately configure the timer on the boot CPU */ |
573 | exynos4_local_timer_setup(&mevt->evt); | 573 | exynos4_local_timer_setup(mevt); |
574 | return; | 574 | return; |
575 | 575 | ||
576 | out_irq: | 576 | out_irq: |