summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/timer.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/timer.h b/include/linux/timer.h
index 3340f3b..ddd5bbe 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -38,6 +38,15 @@ extern struct timer_base_s __init_timer_base;
void fastcall init_timer(struct timer_list * timer);
+static inline void setup_timer(struct timer_list * timer,
+ void (*function)(unsigned long),
+ unsigned long data)
+{
+ timer->function = function;
+ timer->data = data;
+ init_timer(timer);
+}
+
/***
* timer_pending - is a timer pending?
* @timer: the timer in question
OpenPOWER on IntegriCloud