aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2010-01-02 16:57:24 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-02-22 19:15:21 -0500
commit93177a748ba0d4f3d3e51c8e6c785773bf6a70df (patch)
tree1207e03e87d1b68a54ff159c9a8a2f279ea0b6a1 /include/linux/pci.h
parent3804259475314a50e4d7a8a974a22fddb6ac7dd7 (diff)
PCI: Clean up build for CONFIG_PCI_QUIRKS unset
Currently, drivers/pci/quirks.c is built unconditionally, but if CONFIG_PCI_QUIRKS is unset, the only things actually built in this file are definitions of global variables and empty functions (due to the #ifdef CONFIG_PCI_QUIRKS embracing all of the code inside the file). This is not particularly nice and if someone overlooks the #ifdef CONFIG_PCI_QUIRKS, build errors are introduced. To clean that up, move the definitions of the global variables in quirks.c that are always built to pci.c, move the definitions of the empty functions (compiled when CONFIG_PCI_QUIRKS is unset) to headers (additionally make these functions static inline) and modify drivers/pci/Makefile so that quirks.c is only built if CONFIG_PCI_QUIRKS is set. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 0c3a29444f89..16f48e7506ed 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1271,8 +1271,12 @@ enum pci_fixup_pass {
1271 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \ 1271 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \
1272 suspend##vendor##device##hook, vendor, device, hook) 1272 suspend##vendor##device##hook, vendor, device, hook)
1273 1273
1274 1274#ifdef CONFIG_PCI_QUIRKS
1275void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); 1275void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);
1276#else
1277static inline void pci_fixup_device(enum pci_fixup_pass pass,
1278 struct pci_dev *dev) {}
1279#endif
1276 1280
1277void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen); 1281void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen);
1278void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); 1282void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr);