From e13fed0e09571e9be10d70461e1a1c46831ab0f0 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Thu, 2 Sep 2010 06:19:13 -0700 Subject: [PATCH] compat: backport linux/pci-aspm.h pci-aspm.h was introduced in kernel 2.6.25 and is used by the ath5k and iwlwifi driver. v2: Do not place the empty functions into pci-aspm.h. Now we do not have to change pci-aspm.h when it changes in the mainline kernel only compat-2.6.26.h has to be changed. Signed-off-by: Hauke Mehrtens --- include/linux/compat-2.6.26.h | 9 +++++++++ include/linux/pci-aspm.h | 5 +++++ 2 files changed, 14 insertions(+) create mode 100644 include/linux/pci-aspm.h diff --git a/include/linux/compat-2.6.26.h b/include/linux/compat-2.6.26.h index 825117742ba8..30ee46c04d63 100644 --- a/include/linux/compat-2.6.26.h +++ b/include/linux/compat-2.6.26.h @@ -394,6 +394,15 @@ struct net *dev_net(const struct net_device *dev) #endif /* xtensa */ +#define PCIE_LINK_STATE_L0S 1 +#define PCIE_LINK_STATE_L1 2 +#define PCIE_LINK_STATE_CLKPM 4 + +static inline void pci_disable_link_state(struct pci_dev *pdev, int state) +{ +} +/* source: include/linux/pci-aspm.h */ + #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)) */ #endif /* LINUX_26_26_COMPAT_H */ diff --git a/include/linux/pci-aspm.h b/include/linux/pci-aspm.h new file mode 100644 index 000000000000..2bc6efb33300 --- /dev/null +++ b/include/linux/pci-aspm.h @@ -0,0 +1,5 @@ +#include + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25)) +#include_next +#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25)) */ -- 2.30.2