From 61d19bcc2322d9a99a6f2565ab3509e8cffa8fb9 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Fri, 12 Apr 2013 14:02:47 +0200 Subject: [PATCH] backports: dissolve compat-2.6.30.h Signed-off-by: Johannes Berg --- .../backport-include/linux/compat-2.6.30.h | 53 ------------------- backport/backport-include/linux/device.h | 7 +++ backport/backport-include/linux/hid.h | 4 +- backport/backport-include/linux/interrupt.h | 4 ++ backport/backport-include/linux/pci_regs.h | 8 +++ backport/backport-include/linux/pm.h | 9 ++++ backport/backport-include/linux/printk.h | 11 ++++ 7 files changed, 42 insertions(+), 54 deletions(-) delete mode 100644 backport/backport-include/linux/compat-2.6.30.h diff --git a/backport/backport-include/linux/compat-2.6.30.h b/backport/backport-include/linux/compat-2.6.30.h deleted file mode 100644 index 5841b6c8e348..000000000000 --- a/backport/backport-include/linux/compat-2.6.30.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef LINUX_26_30_COMPAT_H -#define LINUX_26_30_COMPAT_H - -#include - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)) - -#include -#include - -#define HID_QUIRK_IGNORE 0x00000004 - -#ifndef TP_PROTO -#define TP_PROTO(args...) TPPROTO(args) -#endif -#ifndef TP_ARGS -#define TP_ARGS(args...) TPARGS(args) -#endif - -#define IRQ_WAKE_THREAD (2) - -/* From : include/linux/pm.h */ -/* How to reorder dpm_list after device_move() */ -enum dpm_order { - DPM_ORDER_NONE, - DPM_ORDER_DEV_AFTER_PARENT, - DPM_ORDER_PARENT_BEFORE_DEV, - DPM_ORDER_DEV_LAST, -}; - -static inline void dev_set_uevent_suppress(struct device *dev, int val) -{ - dev->uevent_suppress = val; -} - -/* - * Print a one-time message (analogous to WARN_ONCE() et al): - */ -#define printk_once(x...) ({ \ - static bool __print_once; \ - \ - if (!__print_once) { \ - __print_once = true; \ - printk(x); \ - } \ -}) - -#define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ -#define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */ - -#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)) */ - -#endif /* LINUX_26_30_COMPAT_H */ diff --git a/backport/backport-include/linux/device.h b/backport/backport-include/linux/device.h index 0e45c1bdb763..516cc31da273 100644 --- a/backport/backport-include/linux/device.h +++ b/backport/backport-include/linux/device.h @@ -122,4 +122,11 @@ static inline void device_unlock(struct device *dev) } #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) +static inline void dev_set_uevent_suppress(struct device *dev, int val) +{ + dev->uevent_suppress = val; +} +#endif + #endif /* __BACKPORT_DEVICE_H */ diff --git a/backport/backport-include/linux/hid.h b/backport/backport-include/linux/hid.h index b642ececba6b..4ad740a4b182 100644 --- a/backport/backport-include/linux/hid.h +++ b/backport/backport-include/linux/hid.h @@ -20,6 +20,8 @@ extern bool hid_ignore(struct hid_device *); #define HID_QUIRK_HIDDEV_FORCE 0x00000010 #endif - +#ifndef HID_QUIRK_IGNORE +#define HID_QUIRK_IGNORE 0x00000004 +#endif #endif /* __BACKPORT_HID_H */ diff --git a/backport/backport-include/linux/interrupt.h b/backport/backport-include/linux/interrupt.h index 546a7fbce630..9e5130331972 100644 --- a/backport/backport-include/linux/interrupt.h +++ b/backport/backport-include/linux/interrupt.h @@ -25,6 +25,10 @@ static inline int irq_set_affinity_hint(unsigned int irq, } #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) +#define IRQ_WAKE_THREAD (2) +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) struct compat_threaded_irq { unsigned int irq; diff --git a/backport/backport-include/linux/pci_regs.h b/backport/backport-include/linux/pci_regs.h index d97e57f94451..f7bfd9a95855 100644 --- a/backport/backport-include/linux/pci_regs.h +++ b/backport/backport-include/linux/pci_regs.h @@ -95,4 +95,12 @@ #define PCI_MSIX_ENTRY_VECTOR_CTRL 12 #endif +#ifndef PCI_EXP_LNKCTL2 +#define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ +#endif + +#ifndef PCI_EXP_SLTCTL2 +#define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */ +#endif + #endif /* __BACKPORT_UAPI_PCI_REGS_H */ diff --git a/backport/backport-include/linux/pm.h b/backport/backport-include/linux/pm.h index 4e30652d0c17..a78477cfda38 100644 --- a/backport/backport-include/linux/pm.h +++ b/backport/backport-include/linux/pm.h @@ -55,4 +55,13 @@ struct dev_pm_ops name = { \ #endif /* >= 2.6.29 */ #endif /* < 2.6.32 */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) +enum dpm_order { + DPM_ORDER_NONE, + DPM_ORDER_DEV_AFTER_PARENT, + DPM_ORDER_PARENT_BEFORE_DEV, + DPM_ORDER_DEV_LAST, +}; +#endif + #endif /* __BACKPORT_PM_H */ diff --git a/backport/backport-include/linux/printk.h b/backport/backport-include/linux/printk.h index c11088881ce3..b97f51ea88fc 100644 --- a/backport/backport-include/linux/printk.h +++ b/backport/backport-include/linux/printk.h @@ -39,6 +39,17 @@ do { \ #define pr_warn pr_warning #endif +#ifndef printk_once +#define printk_once(x...) ({ \ + static bool __print_once; \ + \ + if (!__print_once) { \ + __print_once = true; \ + printk(x); \ + } \ +}) +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) #define pr_emerg_once(fmt, ...) \ printk_once(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) -- 2.30.2