compat: backport tty_set_termios
[~emulex/for-vlad/old/compat.git] / include / linux / compat-2.6.30.h
1 #ifndef LINUX_26_30_COMPAT_H
2 #define LINUX_26_30_COMPAT_H
3
4 #include <linux/version.h>
5
6 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
7
8 #include <linux/device.h>
9
10 #ifndef TP_PROTO
11 #define TP_PROTO(args...)       TPPROTO(args)
12 #endif
13 #ifndef TP_ARGS
14 #define TP_ARGS(args...)        TPARGS(args)
15 #endif
16
17 #define IRQ_WAKE_THREAD (2)
18
19 /* From : include/linux/pm.h */
20 /* How to reorder dpm_list after device_move() */
21 enum dpm_order {
22         DPM_ORDER_NONE,
23         DPM_ORDER_DEV_AFTER_PARENT,
24         DPM_ORDER_PARENT_BEFORE_DEV,
25         DPM_ORDER_DEV_LAST,
26 };
27
28 static inline void dev_set_uevent_suppress(struct device *dev, int val)
29 {
30         dev->uevent_suppress = val;
31 }
32
33 /*
34  * Print a one-time message (analogous to WARN_ONCE() et al):
35  */
36 #define printk_once(x...) ({                    \
37         static bool __print_once;               \
38                                                 \
39         if (!__print_once) {                    \
40                 __print_once = true;            \
41                 printk(x);                      \
42         }                                       \
43 })
44
45 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)) */
46
47 #endif /* LINUX_26_30_COMPAT_H */