Commit 5a9af38d authored by Tejun Heo's avatar Tejun Heo Committed by Thomas Gleixner

timer: Relocate declarations of init_timer_on_stack_key()

init_timer_on_stack_key() is used by init macro definitions.  Move
init_timer_on_stack_key() and destroy_timer_on_stack() declarations
above init macro defs.  This will make the next init cleanup patch
easier to read.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Cc: torvalds@linux-foundation.org
Cc: peterz@infradead.org
Link: http://lkml.kernel.org/r/1344449428-24962-3-git-send-email-tj@kernel.orgSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent e52b1db3
...@@ -97,6 +97,21 @@ void init_timer_deferrable_key(struct timer_list *timer, ...@@ -97,6 +97,21 @@ void init_timer_deferrable_key(struct timer_list *timer,
const char *name, const char *name,
struct lock_class_key *key); struct lock_class_key *key);
#ifdef CONFIG_DEBUG_OBJECTS_TIMERS
extern void init_timer_on_stack_key(struct timer_list *timer,
const char *name,
struct lock_class_key *key);
extern void destroy_timer_on_stack(struct timer_list *timer);
#else
static inline void destroy_timer_on_stack(struct timer_list *timer) { }
static inline void init_timer_on_stack_key(struct timer_list *timer,
const char *name,
struct lock_class_key *key)
{
init_timer_key(timer, name, key);
}
#endif
#ifdef CONFIG_LOCKDEP #ifdef CONFIG_LOCKDEP
#define init_timer(timer) \ #define init_timer(timer) \
do { \ do { \
...@@ -150,21 +165,6 @@ void init_timer_deferrable_key(struct timer_list *timer, ...@@ -150,21 +165,6 @@ void init_timer_deferrable_key(struct timer_list *timer,
setup_deferrable_timer_on_stack_key((timer), NULL, NULL, (fn), (data)) setup_deferrable_timer_on_stack_key((timer), NULL, NULL, (fn), (data))
#endif #endif
#ifdef CONFIG_DEBUG_OBJECTS_TIMERS
extern void init_timer_on_stack_key(struct timer_list *timer,
const char *name,
struct lock_class_key *key);
extern void destroy_timer_on_stack(struct timer_list *timer);
#else
static inline void destroy_timer_on_stack(struct timer_list *timer) { }
static inline void init_timer_on_stack_key(struct timer_list *timer,
const char *name,
struct lock_class_key *key)
{
init_timer_key(timer, name, key);
}
#endif
static inline void setup_timer_key(struct timer_list * timer, static inline void setup_timer_key(struct timer_list * timer,
const char *name, const char *name,
struct lock_class_key *key, struct lock_class_key *key,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment