aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
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 /drivers/pci/pci.c
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 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 315fea47e784..1f9be53c39ba 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -19,7 +19,6 @@
19#include <linux/pci-aspm.h> 19#include <linux/pci-aspm.h>
20#include <linux/pm_wakeup.h> 20#include <linux/pm_wakeup.h>
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <asm/dma.h> /* isa_dma_bridge_buggy */
23#include <linux/device.h> 22#include <linux/device.h>
24#include <asm/setup.h> 23#include <asm/setup.h>
25#include "pci.h" 24#include "pci.h"
@@ -29,6 +28,12 @@ const char *pci_power_names[] = {
29}; 28};
30EXPORT_SYMBOL_GPL(pci_power_names); 29EXPORT_SYMBOL_GPL(pci_power_names);
31 30
31int isa_dma_bridge_buggy;
32EXPORT_SYMBOL(isa_dma_bridge_buggy);
33
34int pci_pci_problems;
35EXPORT_SYMBOL(pci_pci_problems);
36
32unsigned int pci_pm_d3_delay; 37unsigned int pci_pm_d3_delay;
33 38
34static void pci_dev_d3_sleep(struct pci_dev *dev) 39static void pci_dev_d3_sleep(struct pci_dev *dev)