diff options
Diffstat (limited to 'backport/backport-include')
-rw-r--r-- | backport/backport-include/linux/device.h | 16 | ||||
-rw-r--r-- | backport/backport-include/linux/mmc/host.h | 11 | ||||
-rw-r--r-- | backport/backport-include/linux/netdev_features.h | 4 | ||||
-rw-r--r-- | backport/backport-include/linux/netdevice.h | 11 | ||||
-rw-r--r-- | backport/backport-include/linux/pci.h | 102 | ||||
-rw-r--r-- | backport/backport-include/linux/rcupdate.h | 7 | ||||
-rw-r--r-- | backport/backport-include/net/netlink.h | 4 |
7 files changed, 1 insertions, 154 deletions
diff --git a/backport/backport-include/linux/device.h b/backport/backport-include/linux/device.h index d6226abb..3403896d 100644 --- a/backport/backport-include/linux/device.h +++ b/backport/backport-include/linux/device.h @@ -124,19 +124,11 @@ static void init_##_name##_attrs(void) \ } #ifndef __ATTRIBUTE_GROUPS -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) #define __ATTRIBUTE_GROUPS(_name) \ static const struct attribute_group *_name##_groups[] = { \ &_name##_group, \ NULL, \ } -#else -#define __ATTRIBUTE_GROUPS(_name) \ -static struct attribute_group *_name##_groups[] = { \ - &_name##_group, \ - NULL, \ -} -#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) */ #endif /* __ATTRIBUTE_GROUPS */ #undef ATTRIBUTE_GROUPS @@ -147,14 +139,6 @@ static const struct attribute_group _name##_group = { \ static inline void init_##_name##_attrs(void) {} \ __ATTRIBUTE_GROUPS(_name) -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32) -#define dev_get_platdata LINUX_BACKPORT(dev_get_platdata) -static inline void *dev_get_platdata(const struct device *dev) -{ - return dev->platform_data; -} -#endif - #if LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0) #define devm_kmalloc(dev, size, flags) devm_kzalloc(dev, size, flags) #endif diff --git a/backport/backport-include/linux/mmc/host.h b/backport/backport-include/linux/mmc/host.h deleted file mode 100644 index 49ca5c21..00000000 --- a/backport/backport-include/linux/mmc/host.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef __BACKPORT_MMC_HOST_H -#define __BACKPORT_MMC_HOST_H -#include <linux/version.h> -#include_next <linux/mmc/host.h> - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) -/* rename member in struct mmc_host */ -#define max_segs max_hw_segs -#endif - -#endif /* __BACKPORT_MMC_HOST_H */ diff --git a/backport/backport-include/linux/netdev_features.h b/backport/backport-include/linux/netdev_features.h index 76fb4639..350283d6 100644 --- a/backport/backport-include/linux/netdev_features.h +++ b/backport/backport-include/linux/netdev_features.h @@ -8,15 +8,11 @@ #include <linux/types.h> /* added via 9356b8fc */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14) #define NETIF_F_HW_VLAN_CTAG_RX NETIF_F_HW_VLAN_RX #define NETIF_F_HW_VLAN_CTAG_TX NETIF_F_HW_VLAN_TX -#endif /* added via d314774c */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29) #define NETIF_F_HW_VLAN_CTAG_FILTER NETIF_F_HW_VLAN_FILTER -#endif /* c8f44aff made this u32 but later a861a8b2 changed it to u64 both on v3.3 */ typedef u32 netdev_features_t; diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h index 04b310db..2abb47d7 100644 --- a/backport/backport-include/linux/netdevice.h +++ b/backport/backport-include/linux/netdevice.h @@ -82,17 +82,6 @@ static inline void dev_consume_skb_any(struct sk_buff *skb) } #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0) */ -/* d1c76af9e */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) -enum { /* backport: provide the enum name already */ - GRO_MERGED, - GRO_MERGED_FREE, - GRO_HELD, - GRO_NORMAL, - GRO_DROP, -}; -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) */ - #if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,8) #define netdev_set_default_ethtool_ops LINUX_BACKPORT(netdev_set_default_ethtool_ops) extern void netdev_set_default_ethtool_ops(struct net_device *dev, diff --git a/backport/backport-include/linux/pci.h b/backport/backport-include/linux/pci.h index e438f143..3dd2c7e4 100644 --- a/backport/backport-include/linux/pci.h +++ b/backport/backport-include/linux/pci.h @@ -3,73 +3,6 @@ #include_next <linux/pci.h> #include <linux/version.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29) -#define compat_pci_suspend(fn) \ - int fn##_compat(struct pci_dev *pdev, pm_message_t state) \ - { \ - int r; \ - \ - r = fn(&pdev->dev); \ - if (r) \ - return r; \ - \ - pci_save_state(pdev); \ - pci_disable_device(pdev); \ - pci_set_power_state(pdev, PCI_D3hot); \ - \ - return 0; \ - } - -#define compat_pci_resume(fn) \ - int fn##_compat(struct pci_dev *pdev) \ - { \ - int r; \ - \ - pci_set_power_state(pdev, PCI_D0); \ - r = pci_enable_device(pdev); \ - if (r) \ - return r; \ - pci_restore_state(pdev); \ - \ - return fn(&pdev->dev); \ - } -#elif LINUX_VERSION_CODE == KERNEL_VERSION(2,6,29) -#define compat_pci_suspend(fn) \ - int fn##_compat(struct device *dev) \ - { \ - struct pci_dev *pdev = to_pci_dev(dev); \ - int r; \ - \ - r = fn(&pdev->dev); \ - if (r) \ - return r; \ - \ - pci_save_state(pdev); \ - pci_disable_device(pdev); \ - pci_set_power_state(pdev, PCI_D3hot); \ - \ - return 0; \ - } - -#define compat_pci_resume(fn) \ - int fn##_compat(struct device *dev) \ - { \ - struct pci_dev *pdev = to_pci_dev(dev); \ - int r; \ - \ - pci_set_power_state(pdev, PCI_D0); \ - r = pci_enable_device(pdev); \ - if (r) \ - return r; \ - pci_restore_state(pdev); \ - \ - return fn(&pdev->dev); \ - } -#else -#define compat_pci_suspend(fn) -#define compat_pci_resume(fn) -#endif - #ifndef module_pci_driver /** * module_pci_driver() - Helper macro for registering a PCI driver @@ -129,39 +62,6 @@ static inline int pcie_capability_clear_dword(struct pci_dev *dev, int pos, } #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) -/* mask pci_pcie_cap as debian squeeze also backports this */ -#define pci_pcie_cap LINUX_BACKPORT(pci_pcie_cap) -static inline int pci_pcie_cap(struct pci_dev *dev) -{ - return pci_find_capability(dev, PCI_CAP_ID_EXP); -} - -/* mask pci_is_pcie as RHEL6 backports this */ -#define pci_is_pcie LINUX_BACKPORT(pci_is_pcie) -static inline bool pci_is_pcie(struct pci_dev *dev) -{ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) - return dev->is_pcie; -#else - return !!pci_pcie_cap(dev); -#endif -} -#endif /* < 2.6.33 */ - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) -#define pci_ioremap_bar LINUX_BACKPORT(pci_ioremap_bar) -void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar); - -#define pci_wake_from_d3 LINUX_BACKPORT(pci_wake_from_d3) -int pci_wake_from_d3(struct pci_dev *dev, bool enable); -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) -#define pci_pme_capable LINUX_BACKPORT(pci_pme_capable) -bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); -#endif - #ifndef PCI_DEVICE_SUB /** * PCI_DEVICE_SUB - macro used to describe a specific pci device with subsystem @@ -234,7 +134,7 @@ static inline int pci_vfs_assigned(struct pci_dev *dev) #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) */ -#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0)) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0)) #define pci_enable_msi_range LINUX_BACKPORT(pci_enable_msi_range) #ifdef CONFIG_PCI_MSI int pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec); diff --git a/backport/backport-include/linux/rcupdate.h b/backport/backport-include/linux/rcupdate.h index d6d9262b..230d12f8 100644 --- a/backport/backport-include/linux/rcupdate.h +++ b/backport/backport-include/linux/rcupdate.h @@ -41,11 +41,4 @@ #define rcu_dereference_raw(p) rcu_dereference(p) #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34) -static inline int rcu_read_lock_held(void) -{ - return 1; -} -#endif - #endif /* __BACKPORT_LINUX_RCUPDATE_H */ diff --git a/backport/backport-include/net/netlink.h b/backport/backport-include/net/netlink.h index 4f8308ad..9324d02d 100644 --- a/backport/backport-include/net/netlink.h +++ b/backport/backport-include/net/netlink.h @@ -87,11 +87,7 @@ static inline s8 nla_get_s8(const struct nlattr *nla) * @nla: s64 netlink attribute */ #define nla_get_s64 LINUX_BACKPORT(nla_get_s64) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) static inline s64 nla_get_s64(const struct nlattr *nla) -#else -static inline s64 nla_get_s64(struct nlattr *nla) -#endif { s64 tmp; |