diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-05-21 04:03:46 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-06-02 08:40:47 -0400 |
commit | 472c4a9437d3c6a0b1e59df7c5aa14075946aa70 (patch) | |
tree | 6398aeeb0a87cd8c96fb8ba2247efa139f412543 /kernel/time/tick-broadcast.c | |
parent | 3434d23b694e5cb6e44e966914563406c31c4053 (diff) |
clockevents: Use helpers to check the state of a clockevent device
Use accessor functions to check the state of clockevent devices in
core code.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linaro-kernel@lists.linaro.org
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/fa2b9869fd17f210eaa156ec2b594efd0230b6c7.1432192527.git.viresh.kumar@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/time/tick-broadcast.c')
-rw-r--r-- | kernel/time/tick-broadcast.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index 12fcc55d607a..132f819fdcdf 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c | |||
@@ -303,7 +303,7 @@ static void tick_handle_periodic_broadcast(struct clock_event_device *dev) | |||
303 | raw_spin_lock(&tick_broadcast_lock); | 303 | raw_spin_lock(&tick_broadcast_lock); |
304 | bc_local = tick_do_periodic_broadcast(); | 304 | bc_local = tick_do_periodic_broadcast(); |
305 | 305 | ||
306 | if (dev->state == CLOCK_EVT_STATE_ONESHOT) { | 306 | if (clockevent_state_oneshot(dev)) { |
307 | ktime_t next = ktime_add(dev->next_event, tick_period); | 307 | ktime_t next = ktime_add(dev->next_event, tick_period); |
308 | 308 | ||
309 | clockevents_program_event(dev, next, true); | 309 | clockevents_program_event(dev, next, true); |
@@ -528,7 +528,7 @@ static void tick_broadcast_set_affinity(struct clock_event_device *bc, | |||
528 | static void tick_broadcast_set_event(struct clock_event_device *bc, int cpu, | 528 | static void tick_broadcast_set_event(struct clock_event_device *bc, int cpu, |
529 | ktime_t expires) | 529 | ktime_t expires) |
530 | { | 530 | { |
531 | if (bc->state != CLOCK_EVT_STATE_ONESHOT) | 531 | if (!clockevent_state_oneshot(bc)) |
532 | clockevents_set_state(bc, CLOCK_EVT_STATE_ONESHOT); | 532 | clockevents_set_state(bc, CLOCK_EVT_STATE_ONESHOT); |
533 | 533 | ||
534 | clockevents_program_event(bc, expires, 1); | 534 | clockevents_program_event(bc, expires, 1); |
@@ -831,7 +831,7 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc) | |||
831 | 831 | ||
832 | /* Set it up only once ! */ | 832 | /* Set it up only once ! */ |
833 | if (bc->event_handler != tick_handle_oneshot_broadcast) { | 833 | if (bc->event_handler != tick_handle_oneshot_broadcast) { |
834 | int was_periodic = bc->state == CLOCK_EVT_STATE_PERIODIC; | 834 | int was_periodic = clockevent_state_periodic(bc); |
835 | 835 | ||
836 | bc->event_handler = tick_handle_oneshot_broadcast; | 836 | bc->event_handler = tick_handle_oneshot_broadcast; |
837 | 837 | ||