(fn), (data)); \
} while (0)
#endif
+#endif
+
+#ifndef TIMER_DEFERRABLE
+#define TIMER_DEFERRABLE 1
+#endif
+
+#ifndef from_timer
+#define TIMER_DATA_TYPE unsigned long
+#define TIMER_FUNC_TYPE void (*)(TIMER_DATA_TYPE)
+
+static inline void timer_setup(struct timer_list *timer,
+ void (*callback) (struct timer_list *),
+ unsigned int flags)
+{
+#ifdef __setup_timer
+ __setup_timer(timer, (TIMER_FUNC_TYPE) callback,
+ (TIMER_DATA_TYPE) timer, flags);
+#else
+ if (flags & TIMER_DEFERRABLE)
+ setup_deferrable_timer(timer, (TIMER_FUNC_TYPE) callback,
+ (TIMER_DATA_TYPE) timer);
+ else
+ setup_timer(timer, (TIMER_FUNC_TYPE) callback,
+ (TIMER_DATA_TYPE) timer);
+#endif
+}
+#define from_timer(var, callback_timer, timer_fieldname) \
+ container_of(callback_timer, typeof(*var), timer_fieldname)
#endif
#endif /* _BACKPORT_TIMER_H */