lkml.org 
[lkml]   [2014]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 09/38] tick-oneshot: remove tick_resume_oneshot()
Date
tick_resume_oneshot() and tick_setup_oneshot() have almost the same
implementation and tick_setup_oneshot() can be used easily instead of
tick_resume_oneshot(). So, remove tick_resume_oneshot() and use
tick_setup_oneshot() in its place.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
kernel/time/tick-common.c | 8 +++++---
kernel/time/tick-internal.h | 5 -----
kernel/time/tick-oneshot.c | 11 -----------
3 files changed, 5 insertions(+), 19 deletions(-)

diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index 298467e..949f3d3 100644
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -363,15 +363,17 @@ void tick_suspend(void)
void tick_resume(void)
{
struct tick_device *td = tick_get_cpu_device();
+ struct clock_event_device *dev = td->evtdev;
int broadcast = tick_resume_broadcast();

- clockevents_set_mode(td->evtdev, CLOCK_EVT_MODE_RESUME);
+ clockevents_set_mode(dev, CLOCK_EVT_MODE_RESUME);

if (!broadcast) {
if (td->mode == TICKDEV_MODE_PERIODIC)
- tick_setup_periodic(td->evtdev, 0);
+ tick_setup_periodic(dev, 0);
else
- tick_resume_oneshot();
+ tick_setup_oneshot(dev, dev->event_handler,
+ ktime_get());
}
}

diff --git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h
index 09f4307..65f080a 100644
--- a/kernel/time/tick-internal.h
+++ b/kernel/time/tick-internal.h
@@ -43,7 +43,6 @@ extern int tick_program_event(ktime_t expires, int force);
extern void tick_oneshot_notify(void);
extern int tick_switch_to_oneshot(void (*handler)(struct clock_event_device *));
extern int tick_is_oneshot_available(void);
-extern void tick_resume_oneshot(void);
# ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
extern void tick_broadcast_setup_oneshot(struct clock_event_device *bc);
extern int tick_broadcast_oneshot_control(unsigned long reason);
@@ -74,10 +73,6 @@ void tick_setup_oneshot(struct clock_event_device *newdev,
{
BUG();
}
-static inline void tick_resume_oneshot(void)
-{
- BUG();
-}
static inline int tick_program_event(ktime_t expires, int force)
{
return 0;
diff --git a/kernel/time/tick-oneshot.c b/kernel/time/tick-oneshot.c
index cb158f7..82fc3f5 100644
--- a/kernel/time/tick-oneshot.c
+++ b/kernel/time/tick-oneshot.c
@@ -32,17 +32,6 @@ int tick_program_event(ktime_t expires, int force)
}

/**
- * tick_resume_onshot - resume oneshot mode
- */
-void tick_resume_oneshot(void)
-{
- struct clock_event_device *dev = tick_get_cpu_device()->evtdev;
-
- clockevents_set_mode(dev, CLOCK_EVT_MODE_ONESHOT);
- clockevents_program_event(dev, ktime_get(), true);
-}
-
-/**
* tick_setup_oneshot - setup the event device for oneshot mode (hres or nohz)
*/
void tick_setup_oneshot(struct clock_event_device *newdev,
--
1.7.12.rc2.18.g61b472e


\
 
 \ /
  Last update: 2014-04-14 22:21    [W:0.147 / U:3.816 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site