diff options
| -rw-r--r-- | include/linux/timer.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/include/linux/timer.h b/include/linux/timer.h index cbd32ec4dd15..1d364aed1802 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
| @@ -97,6 +97,21 @@ void init_timer_deferrable_key(struct timer_list *timer, | |||
| 97 | const char *name, | 97 | const char *name, |
| 98 | struct lock_class_key *key); | 98 | struct lock_class_key *key); |
| 99 | 99 | ||
| 100 | #ifdef CONFIG_DEBUG_OBJECTS_TIMERS | ||
| 101 | extern void init_timer_on_stack_key(struct timer_list *timer, | ||
| 102 | const char *name, | ||
| 103 | struct lock_class_key *key); | ||
| 104 | extern void destroy_timer_on_stack(struct timer_list *timer); | ||
| 105 | #else | ||
| 106 | static inline void destroy_timer_on_stack(struct timer_list *timer) { } | ||
| 107 | static inline void init_timer_on_stack_key(struct timer_list *timer, | ||
| 108 | const char *name, | ||
| 109 | struct lock_class_key *key) | ||
| 110 | { | ||
| 111 | init_timer_key(timer, name, key); | ||
| 112 | } | ||
| 113 | #endif | ||
| 114 | |||
| 100 | #ifdef CONFIG_LOCKDEP | 115 | #ifdef CONFIG_LOCKDEP |
| 101 | #define init_timer(timer) \ | 116 | #define init_timer(timer) \ |
| 102 | do { \ | 117 | do { \ |
| @@ -150,21 +165,6 @@ void init_timer_deferrable_key(struct timer_list *timer, | |||
| 150 | setup_deferrable_timer_on_stack_key((timer), NULL, NULL, (fn), (data)) | 165 | setup_deferrable_timer_on_stack_key((timer), NULL, NULL, (fn), (data)) |
| 151 | #endif | 166 | #endif |
| 152 | 167 | ||
| 153 | #ifdef CONFIG_DEBUG_OBJECTS_TIMERS | ||
| 154 | extern void init_timer_on_stack_key(struct timer_list *timer, | ||
| 155 | const char *name, | ||
| 156 | struct lock_class_key *key); | ||
| 157 | extern void destroy_timer_on_stack(struct timer_list *timer); | ||
| 158 | #else | ||
| 159 | static inline void destroy_timer_on_stack(struct timer_list *timer) { } | ||
| 160 | static inline void init_timer_on_stack_key(struct timer_list *timer, | ||
| 161 | const char *name, | ||
| 162 | struct lock_class_key *key) | ||
| 163 | { | ||
| 164 | init_timer_key(timer, name, key); | ||
| 165 | } | ||
| 166 | #endif | ||
| 167 | |||
| 168 | static inline void setup_timer_key(struct timer_list * timer, | 168 | static inline void setup_timer_key(struct timer_list * timer, |
| 169 | const char *name, | 169 | const char *name, |
| 170 | struct lock_class_key *key, | 170 | struct lock_class_key *key, |
