lkml.org 
[lkml]   [2017]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 03/31] timer: Remove init_timer_pinned_deferrable() in favor of setup_pinned_deferrable_timer()
Date
Remove uses of init_timer_pinned_deferrable() with open-coded
function and data assignments that could be expressed using
setup_pinned_deferrable_timer().

Signed-off-by: Kees Cook <keescook@chromium.org>
---
drivers/cpufreq/powernv-cpufreq.c | 5 ++---
include/linux/timer.h | 2 --
2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
index 3ff5160451b4..3946660b0987 100644
--- a/drivers/cpufreq/powernv-cpufreq.c
+++ b/drivers/cpufreq/powernv-cpufreq.c
@@ -800,9 +800,8 @@ static int powernv_cpufreq_cpu_init(struct cpufreq_policy *policy)
policy->driver_data = gpstates;

/* initialize timer */
- init_timer_pinned_deferrable(&gpstates->timer);
- gpstates->timer.data = (unsigned long)policy;
- gpstates->timer.function = gpstate_timer_handler;
+ setup_pinned_deferrable_timer(&gpstates->timer, gpstate_timer_handler,
+ (unsigned long)policy);
gpstates->timer.expires = jiffies +
msecs_to_jiffies(GPSTATE_TIMER_INTERVAL);
spin_lock_init(&gpstates->gpstate_lock);
diff --git a/include/linux/timer.h b/include/linux/timer.h
index e6789b8757d5..1b2bb2d978de 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -132,8 +132,6 @@ static inline void init_timer_on_stack_key(struct timer_list *timer,
__init_timer((timer), TIMER_PINNED)
#define init_timer_deferrable(timer) \
__init_timer((timer), TIMER_DEFERRABLE)
-#define init_timer_pinned_deferrable(timer) \
- __init_timer((timer), TIMER_DEFERRABLE | TIMER_PINNED)
#define init_timer_on_stack(timer) \
__init_timer_on_stack((timer), 0)

--
2.7.4
\
 
 \ /
  Last update: 2017-09-21 19:24    [W:0.202 / U:2.080 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site