PNP: define PNP-specific IORESOURCE_IO_* flags alongside IRQ, DMA, MEM
[sfrench/cifs-2.6.git] / include / linux / timer.h
index 78cf899b440969a44049f7c052e2f9e167b47bd5..d4ba79248a27fab0f33a9697deebd02bfb9440e3 100644 (file)
@@ -4,8 +4,9 @@
 #include <linux/list.h>
 #include <linux/ktime.h>
 #include <linux/stddef.h>
+#include <linux/debugobjects.h>
 
-struct tvec_t_base_s;
+struct tvec_base;
 
 struct timer_list {
        struct list_head entry;
@@ -14,7 +15,7 @@ struct timer_list {
        void (*function)(unsigned long);
        unsigned long data;
 
-       struct tvec_t_base_s *base;
+       struct tvec_base *base;
 #ifdef CONFIG_TIMER_STATS
        void *start_site;
        char start_comm[16];
@@ -22,9 +23,10 @@ struct timer_list {
 #endif
 };
 
-extern struct tvec_t_base_s boot_tvec_bases;
+extern struct tvec_base boot_tvec_bases;
 
 #define TIMER_INITIALIZER(_function, _expires, _data) {                \
+               .entry = { .prev = TIMER_ENTRY_STATIC },        \
                .function = (_function),                        \
                .expires = (_expires),                          \
                .data = (_data),                                \
@@ -35,8 +37,19 @@ extern struct tvec_t_base_s boot_tvec_bases;
        struct timer_list _name =                               \
                TIMER_INITIALIZER(_function, _expires, _data)
 
-void fastcall init_timer(struct timer_list * timer);
-void fastcall init_timer_deferrable(struct timer_list *timer);
+void init_timer(struct timer_list *timer);
+void init_timer_deferrable(struct timer_list *timer);
+
+#ifdef CONFIG_DEBUG_OBJECTS_TIMERS
+extern void init_timer_on_stack(struct timer_list *timer);
+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(struct timer_list *timer)
+{
+       init_timer(timer);
+}
+#endif
 
 static inline void setup_timer(struct timer_list * timer,
                                void (*function)(unsigned long),
@@ -47,6 +60,15 @@ static inline void setup_timer(struct timer_list * timer,
        init_timer(timer);
 }
 
+static inline void setup_timer_on_stack(struct timer_list *timer,
+                                       void (*function)(unsigned long),
+                                       unsigned long data)
+{
+       timer->function = function;
+       timer->data = data;
+       init_timer_on_stack(timer);
+}
+
 /**
  * timer_pending - is a timer pending?
  * @timer: the timer in question
@@ -124,8 +146,6 @@ static inline void timer_stats_timer_clear_start_info(struct timer_list *timer)
 }
 #endif
 
-extern void delayed_work_timer_fn(unsigned long __data);
-
 /**
  * add_timer - start a timer
  * @timer: the timer to be added
@@ -166,5 +186,4 @@ unsigned long __round_jiffies_relative(unsigned long j, int cpu);
 unsigned long round_jiffies(unsigned long j);
 unsigned long round_jiffies_relative(unsigned long j);
 
-
 #endif