compat: backport USHRT_MAX, SHRT_MAX and SHRT_MIN
[~emulex/for-vlad/old/compat.git] / include / linux / compat-2.6.35.h
1 #ifndef LINUX_26_35_COMPAT_H
2 #define LINUX_26_35_COMPAT_H
3
4 #include <linux/version.h>
5
6 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35))
7 #include <linux/etherdevice.h>
8 #include <net/sock.h>
9 #include <linux/types.h>
10
11 /* added on linux/kernel.h */
12 #define USHRT_MAX      ((u16)(~0U))
13 #define SHRT_MAX       ((s16)(USHRT_MAX>>1))
14 #define SHRT_MIN       ((s16)(-SHRT_MAX - 1))
15
16 #define IW_HANDLER(id, func)                    \
17         [IW_IOCTL_IDX(id)] = func
18
19 #define  SDIO_BUS_ECSI          0x20    /* Enable continuous SPI interrupt */
20 #define  SDIO_BUS_SCSI          0x40    /* Support continuous SPI interrupt */
21
22 #define netdev_hw_addr dev_mc_list
23
24 static inline wait_queue_head_t *sk_sleep(struct sock *sk)
25 {
26         return sk->sk_sleep;
27 }
28
29 #define kparam_block_sysfs_write(a)
30 #define kparam_unblock_sysfs_write(a)
31
32 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) */
33
34 #endif /* LINUX_26_35_COMPAT_H */