summaryrefslogtreecommitdiffstats
path: root/kernel/time/tick-oneshot.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2015-06-02 14:08:46 +0200
committerThomas Gleixner <tglx@linutronix.de>2015-06-02 14:40:47 +0200
commitd7eb231c71420bc34ac3d35403115600f920cfc2 (patch)
tree6368b8933cfa40786ecea7afa7999b0390f333dd /kernel/time/tick-oneshot.c
parent472c4a9437d3c6a0b1e59df7c5aa14075946aa70 (diff)
downloadop-kernel-dev-d7eb231c71420bc34ac3d35403115600f920cfc2.zip
op-kernel-dev-d7eb231c71420bc34ac3d35403115600f920cfc2.tar.gz
clockevents: Provide functions to set and get the state
We want to rename dev->state, so provide proper get and set functions. Rename clockevents_set_state() to clockevents_switch_state() to avoid confusion. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'kernel/time/tick-oneshot.c')
-rw-r--r--kernel/time/tick-oneshot.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/time/tick-oneshot.c b/kernel/time/tick-oneshot.c
index 3f9715be..b513446 100644
--- a/kernel/time/tick-oneshot.c
+++ b/kernel/time/tick-oneshot.c
@@ -32,7 +32,7 @@ int tick_program_event(ktime_t expires, int force)
/*
* We don't need the clock event device any more, stop it.
*/
- clockevents_set_state(dev, CLOCK_EVT_STATE_ONESHOT_STOPPED);
+ clockevents_switch_state(dev, CLOCK_EVT_STATE_ONESHOT_STOPPED);
return 0;
}
@@ -41,7 +41,7 @@ int tick_program_event(ktime_t expires, int force)
* We need the clock event again, configure it in ONESHOT mode
* before using it.
*/
- clockevents_set_state(dev, CLOCK_EVT_STATE_ONESHOT);
+ clockevents_switch_state(dev, CLOCK_EVT_STATE_ONESHOT);
}
return clockevents_program_event(dev, expires, force);
@@ -54,7 +54,7 @@ void tick_resume_oneshot(void)
{
struct clock_event_device *dev = __this_cpu_read(tick_cpu_device.evtdev);
- clockevents_set_state(dev, CLOCK_EVT_STATE_ONESHOT);
+ clockevents_switch_state(dev, CLOCK_EVT_STATE_ONESHOT);
clockevents_program_event(dev, ktime_get(), true);
}
@@ -66,7 +66,7 @@ void tick_setup_oneshot(struct clock_event_device *newdev,
ktime_t next_event)
{
newdev->event_handler = handler;
- clockevents_set_state(newdev, CLOCK_EVT_STATE_ONESHOT);
+ clockevents_switch_state(newdev, CLOCK_EVT_STATE_ONESHOT);
clockevents_program_event(newdev, next_event, true);
}
@@ -97,7 +97,7 @@ int tick_switch_to_oneshot(void (*handler)(struct clock_event_device *))
td->mode = TICKDEV_MODE_ONESHOT;
dev->event_handler = handler;
- clockevents_set_state(dev, CLOCK_EVT_STATE_ONESHOT);
+ clockevents_switch_state(dev, CLOCK_EVT_STATE_ONESHOT);
tick_broadcast_switch_to_oneshot();
return 0;
}
OpenPOWER on IntegriCloud