summaryrefslogtreecommitdiffstats
path: root/drivers/pci/Makefile
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2010-01-02 22:57:24 +0100
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-02-22 16:15:21 -0800
commit93177a748ba0d4f3d3e51c8e6c785773bf6a70df (patch)
tree1207e03e87d1b68a54ff159c9a8a2f279ea0b6a1 /drivers/pci/Makefile
parent3804259475314a50e4d7a8a974a22fddb6ac7dd7 (diff)
downloadlinux-93177a748ba0d4f3d3e51c8e6c785773bf6a70df.tar.gz
linux-93177a748ba0d4f3d3e51c8e6c785773bf6a70df.tar.bz2
linux-93177a748ba0d4f3d3e51c8e6c785773bf6a70df.zip
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/Makefile')
-rw-r--r--drivers/pci/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index 4df48d58eaa6..adb74253a996 100644
--- a/drivers/pci/Makefile
+++ b/drivers/pci/Makefile
@@ -2,12 +2,14 @@
# Makefile for the PCI bus specific drivers.
#
-obj-y += access.o bus.o probe.o remove.o pci.o quirks.o \
+obj-y += access.o bus.o probe.o remove.o pci.o \
pci-driver.o search.o pci-sysfs.o rom.o setup-res.o \
irq.o
obj-$(CONFIG_PROC_FS) += proc.o
obj-$(CONFIG_SYSFS) += slot.o
+obj-$(CONFIG_PCI_QUIRKS) += quirks.o
+
obj-$(CONFIG_PCI_LEGACY) += legacy.o
CFLAGS_legacy.o += -Wno-deprecated-declarations