summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-12-08 16:08:09 +0100
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>2013-12-08 19:30:41 +0100
commit3f8c0a7df40f574eb20ecd79fb7fbd7b60bb66d5 (patch)
tree0c0ce9b425b38e0ca4dd1d6a976831874e4c6bdc
parenta9081420811be2a9c7386b4693c5cf1b93b3ae23 (diff)
backports: add LINUX_BACKPORT infront of functions
This is needed to add support for SLES 11 SP3 support. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
-rw-r--r--backport/backport-include/linux/pci.h4
-rw-r--r--backport/backport-include/linux/usb.h1
-rw-r--r--backport/backport-include/linux/usb/ch9.h1
-rw-r--r--backport/backport-include/linux/watchdog.h1
-rw-r--r--backport/compat/compat-3.7.c9
5 files changed, 10 insertions, 6 deletions
diff --git a/backport/backport-include/linux/pci.h b/backport/backport-include/linux/pci.h
index 208278d4..3a1815ac 100644
--- a/backport/backport-include/linux/pci.h
+++ b/backport/backport-include/linux/pci.h
@@ -100,24 +100,28 @@ int pcie_capability_clear_and_set_word(struct pci_dev *dev, int pos,
int pcie_capability_clear_and_set_dword(struct pci_dev *dev, int pos,
u32 clear, u32 set);
+#define pcie_capability_set_word LINUX_BACKPORT(pcie_capability_set_word)
static inline int pcie_capability_set_word(struct pci_dev *dev, int pos,
u16 set)
{
return pcie_capability_clear_and_set_word(dev, pos, 0, set);
}
+#define pcie_capability_set_dword LINUX_BACKPORT(pcie_capability_set_dword)
static inline int pcie_capability_set_dword(struct pci_dev *dev, int pos,
u32 set)
{
return pcie_capability_clear_and_set_dword(dev, pos, 0, set);
}
+#define pcie_capability_clear_word LINUX_BACKPORT(pcie_capability_clear_word)
static inline int pcie_capability_clear_word(struct pci_dev *dev, int pos,
u16 clear)
{
return pcie_capability_clear_and_set_word(dev, pos, clear, 0);
}
+#define pcie_capability_clear_dword LINUX_BACKPORT(pcie_capability_clear_dword)
static inline int pcie_capability_clear_dword(struct pci_dev *dev, int pos,
u32 clear)
{
diff --git a/backport/backport-include/linux/usb.h b/backport/backport-include/linux/usb.h
index 7f5ba20c..08ae0f2c 100644
--- a/backport/backport-include/linux/usb.h
+++ b/backport/backport-include/linux/usb.h
@@ -144,6 +144,7 @@ extern int usb_anchor_empty(struct usb_anchor *anchor);
#endif /* 2.6.23-2.6.27 */
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0)
+#define usb_translate_errors LINUX_BACKPORT(usb_translate_errors)
static inline int usb_translate_errors(int error_code)
{
switch (error_code) {
diff --git a/backport/backport-include/linux/usb/ch9.h b/backport/backport-include/linux/usb/ch9.h
index 222b3f9c..33c59592 100644
--- a/backport/backport-include/linux/usb/ch9.h
+++ b/backport/backport-include/linux/usb/ch9.h
@@ -36,6 +36,7 @@ enum usb_device_speed {
*
* Returns @epd's max packet
*/
+#define usb_endpoint_maxp LINUX_BACKPORT(usb_endpoint_maxp)
static inline int usb_endpoint_maxp(const struct usb_endpoint_descriptor *epd)
{
return __le16_to_cpu(epd->wMaxPacketSize);
diff --git a/backport/backport-include/linux/watchdog.h b/backport/backport-include/linux/watchdog.h
index fb685353..49f66693 100644
--- a/backport/backport-include/linux/watchdog.h
+++ b/backport/backport-include/linux/watchdog.h
@@ -4,6 +4,7 @@
#if (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(6,4))
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)
+#define watchdog_device LINUX_BACKPORT(watchdog_device)
struct watchdog_device {
};
#endif
diff --git a/backport/compat/compat-3.7.c b/backport/compat/compat-3.7.c
index 2d739f93..f7e7848b 100644
--- a/backport/compat/compat-3.7.c
+++ b/backport/compat/compat-3.7.c
@@ -47,21 +47,18 @@ static inline u16 pcie_flags_reg(struct pci_dev *dev)
return reg16;
}
+#define pci_pcie_type LINUX_BACKPORT(pci_pcie_type)
static inline int pci_pcie_type(struct pci_dev *dev)
{
return (pcie_flags_reg(dev) & PCI_EXP_FLAGS_TYPE) >> 4;
}
+#define pcie_cap_version LINUX_BACKPORT(pcie_cap_version)
static inline int pcie_cap_version(struct pci_dev *dev)
{
return pcie_flags_reg(dev) & PCI_EXP_FLAGS_VERS;
}
-static inline bool pcie_cap_has_devctl(const struct pci_dev *dev)
-{
- return true;
-}
-
static inline bool pcie_cap_has_lnkctl(struct pci_dev *dev)
{
int type = pci_pcie_type(dev);
@@ -102,7 +99,7 @@ static bool pcie_capability_reg_implemented(struct pci_dev *dev, int pos)
case PCI_EXP_DEVCAP:
case PCI_EXP_DEVCTL:
case PCI_EXP_DEVSTA:
- return pcie_cap_has_devctl(dev);
+ return true;
case PCI_EXP_LNKCAP:
case PCI_EXP_LNKCTL:
case PCI_EXP_LNKSTA: