aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/timer.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-09 03:02:35 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-09 03:02:35 -0400
commit1236d6bb6e19fc72ffc6bbcdeb1bfefe450e54ee (patch)
tree47da3feee8e263e8c9352c85cf518e624be3c211 /include/linux/timer.h
parent750b1a6894ecc9b178c6e3d0a1170122971b2036 (diff)
parent8a5776a5f49812d29fe4b2d0a2d71675c3facf3f (diff)
Merge 4.14-rc4 into staging-next
We want the staging/iio fixes in here as well to handle merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/timer.h')
-rw-r--r--include/linux/timer.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/timer.h b/include/linux/timer.h
index e6789b8757d5..6383c528b148 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -168,6 +168,20 @@ static inline void init_timer_on_stack_key(struct timer_list *timer,
168#define setup_pinned_deferrable_timer_on_stack(timer, fn, data) \ 168#define setup_pinned_deferrable_timer_on_stack(timer, fn, data) \
169 __setup_timer_on_stack((timer), (fn), (data), TIMER_DEFERRABLE | TIMER_PINNED) 169 __setup_timer_on_stack((timer), (fn), (data), TIMER_DEFERRABLE | TIMER_PINNED)
170 170
171#define TIMER_DATA_TYPE unsigned long
172#define TIMER_FUNC_TYPE void (*)(TIMER_DATA_TYPE)
173
174static inline void timer_setup(struct timer_list *timer,
175 void (*callback)(struct timer_list *),
176 unsigned int flags)
177{
178 __setup_timer(timer, (TIMER_FUNC_TYPE)callback,
179 (TIMER_DATA_TYPE)timer, flags);
180}
181
182#define from_timer(var, callback_timer, timer_fieldname) \
183 container_of(callback_timer, typeof(*var), timer_fieldname)
184
171/** 185/**
172 * timer_pending - is a timer pending? 186 * timer_pending - is a timer pending?
173 * @timer: the timer in question 187 * @timer: the timer in question