summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-08-24 16:28:59 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2013-10-28 20:53:40 +0100
commit1b1a83c83251941aab386b01d5e2d766e0c1ba1d (patch)
treeda4b681755cbdae8286461b9d7755b965144d6ff
parentd32d06ec6fd09dab0c436df3a42cd1b96a0c1ae0 (diff)
backports: do not depend on PCI functions when PCI is disabled in the kernel
Upstream commit: 168beb7a3dad933d29f8e0dabd37db8cf189a4c7 This should prevent some compile errors when backports is used with a kernel without PCI 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/compat/compat-2.6.27.c2
-rw-r--r--backport/compat/compat-2.6.28.c4
-rw-r--r--backport/compat/compat-3.7.c2
3 files changed, 8 insertions, 0 deletions
diff --git a/backport/compat/compat-2.6.27.c b/backport/compat/compat-2.6.27.c
index 79bbed54..0146263f 100644
--- a/backport/compat/compat-2.6.27.c
+++ b/backport/compat/compat-2.6.27.c
@@ -29,6 +29,7 @@
* we have to call the PCI routines directly.
*/
+#ifdef CONFIG_PCI
/**
* pci_pme_capable - check the capability of PCI device to generate PME#
* @dev: PCI device to handle.
@@ -65,6 +66,7 @@ bool pci_pme_capable(struct pci_dev *dev, pci_power_t state)
return !!(pme_support & (1 << state));
}
EXPORT_SYMBOL_GPL(pci_pme_capable);
+#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
/**
diff --git a/backport/compat/compat-2.6.28.c b/backport/compat/compat-2.6.28.c
index 451e6147..731ae04c 100644
--- a/backport/compat/compat-2.6.28.c
+++ b/backport/compat/compat-2.6.28.c
@@ -238,6 +238,7 @@ EXPORT_SYMBOL_GPL(usb_anchor_empty);
#endif /* CONFIG_USB */
#endif
+#ifdef CONFIG_PCI
void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar)
{
/*
@@ -251,6 +252,7 @@ void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar)
pci_resource_len(pdev, bar));
}
EXPORT_SYMBOL_GPL(pci_ioremap_bar);
+#endif
static unsigned long round_jiffies_common(unsigned long j, int cpu,
bool force_up)
@@ -441,6 +443,7 @@ int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file,
}
EXPORT_SYMBOL_GPL(n_tty_ioctl_helper);
+#ifdef CONFIG_PCI
/**
* pci_wake_from_d3 - enable/disable device to wake up from D3_hot or D3_cold
* @dev: PCI device to prepare
@@ -462,4 +465,5 @@ int pci_wake_from_d3(struct pci_dev *dev, bool enable)
pci_enable_wake(dev, PCI_D3hot, enable);
}
EXPORT_SYMBOL_GPL(pci_wake_from_d3);
+#endif
diff --git a/backport/compat/compat-3.7.c b/backport/compat/compat-3.7.c
index 284e8dcb..c8810fc6 100644
--- a/backport/compat/compat-3.7.c
+++ b/backport/compat/compat-3.7.c
@@ -22,6 +22,7 @@ bool mod_delayed_work(struct workqueue_struct *wq, struct delayed_work *dwork,
}
EXPORT_SYMBOL_GPL(mod_delayed_work);
+#ifdef CONFIG_PCI
/*
* Kernels >= 3.7 get their PCI-E Capabilities Register cached
* via the pci_dev->pcie_flags_reg so for older kernels we have
@@ -251,3 +252,4 @@ int pcie_capability_clear_and_set_dword(struct pci_dev *dev, int pos,
return ret;
}
EXPORT_SYMBOL_GPL(pcie_capability_clear_and_set_dword);
+#endif