summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/Makefile
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@osg.samsung.com>2015-11-20 12:35:02 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-12-09 17:40:41 -0500
commit08dc7c7e407fed00a89bd6f4fc13c7ea20320de1 (patch)
tree2a518f05f8a78fe406ce5cfd1527dcf0de63cfff /drivers/acpi/Makefile
parent527e9316f8ec44bd53d90fb9f611fa7ffff52bb9 (diff)
ACPI: Fix build errors due objects compiled unconditionally
If the CONFIG_ACPI Kconfig symbol is not enabled and a partial build is attempted, compile errors will happen due missing types and identifiers. This can be easily reproduced with the following commands: $ export CROSS_COMPILE="arm-linux-gnueabihf-" ARCH=arm $ make allmodconfig $ make M=drivers/acpi/ CC drivers/acpi//tables.o drivers/acpi//tables.c:235:3: warning: 'struct acpi_subtable_proc' declared inside parameter list unsigned int max_entries) ^ drivers/acpi//tables.c:235:3: warning: its scope is only this definition or declaration, which is probably not what you want drivers/acpi//tables.c: In function 'acpi_parse_entries_array': drivers/acpi//tables.c:269:4: error: invalid use of undefined type 'struct acpi_subtable_proc' ... scripts/Makefile.build:258: recipe for target 'drivers/acpi//tables.o' failed make[1]: *** [drivers/acpi//tables.o] Error 1 Makefile:1401: recipe for target '_module_drivers/acpi/' failed make: *** [_module_drivers/acpi/] Error 2 This is because objects are tried to be built unconditionally even when CONFIG_ACPI is not enabled. This is usually not a problem since arches' Kconfig sources drivers/acpi/Kconfig directly and also selects ACPI but the Makefile should conditionally build the objects as well to prevent these build errors. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/Makefile')
-rw-r--r--drivers/acpi/Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
index 675eaf337178..73ec23ca7db1 100644
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -8,13 +8,13 @@ ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT
8# 8#
9# ACPI Boot-Time Table Parsing 9# ACPI Boot-Time Table Parsing
10# 10#
11obj-y += tables.o 11obj-$(CONFIG_ACPI) += tables.o
12obj-$(CONFIG_X86) += blacklist.o 12obj-$(CONFIG_X86) += blacklist.o
13 13
14# 14#
15# ACPI Core Subsystem (Interpreter) 15# ACPI Core Subsystem (Interpreter)
16# 16#
17obj-y += acpi.o \ 17obj-$(CONFIG_ACPI) += acpi.o \
18 acpica/ 18 acpica/
19 19
20# All the builtin files are in the "acpi." module_param namespace. 20# All the builtin files are in the "acpi." module_param namespace.
@@ -66,10 +66,10 @@ obj-$(CONFIG_ACPI_FAN) += fan.o
66obj-$(CONFIG_ACPI_VIDEO) += video.o 66obj-$(CONFIG_ACPI_VIDEO) += video.o
67obj-$(CONFIG_ACPI_PCI_SLOT) += pci_slot.o 67obj-$(CONFIG_ACPI_PCI_SLOT) += pci_slot.o
68obj-$(CONFIG_ACPI_PROCESSOR) += processor.o 68obj-$(CONFIG_ACPI_PROCESSOR) += processor.o
69obj-y += container.o 69obj-$(CONFIG_ACPI) += container.o
70obj-$(CONFIG_ACPI_THERMAL) += thermal.o 70obj-$(CONFIG_ACPI_THERMAL) += thermal.o
71obj-$(CONFIG_ACPI_NFIT) += nfit.o 71obj-$(CONFIG_ACPI_NFIT) += nfit.o
72obj-y += acpi_memhotplug.o 72obj-$(CONFIG_ACPI) += acpi_memhotplug.o
73obj-$(CONFIG_ACPI_HOTPLUG_IOAPIC) += ioapic.o 73obj-$(CONFIG_ACPI_HOTPLUG_IOAPIC) += ioapic.o
74obj-$(CONFIG_ACPI_BATTERY) += battery.o 74obj-$(CONFIG_ACPI_BATTERY) += battery.o
75obj-$(CONFIG_ACPI_SBS) += sbshc.o 75obj-$(CONFIG_ACPI_SBS) += sbshc.o