]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Clean up build for CONFIG_PCI_QUIRKS unset
authorRafael J. Wysocki <rjw@sisk.pl>
Sat, 2 Jan 2010 21:57:24 +0000 (22:57 +0100)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 23 Feb 2010 00:15:21 +0000 (16:15 -0800)
commit2fa1102e57d0067f5c07e57560cade97900462ed
tree1207e03e87d1b68a54ff159c9a8a2f279ea0b6a1
parent05e0d7fcedf1680b1fc356c2facc39d7004529dc
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>
drivers/pci/Makefile
drivers/pci/pci.c
drivers/pci/pci.h
drivers/pci/quirks.c
include/linux/pci.h