ACPI: simplify module_param namespace
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 11 Mar 2009 22:37:19 +0000 (09:07 +1030)
committerLen Brown <len.brown@intel.com>
Thu, 2 Apr 2009 20:38:11 +0000 (16:38 -0400)
Impact: cleanup

Rather than overriding MODULE_PARAM_PREFIX, build via acpi.o so
KBUILD_MODNAME is set to "acpi".

This is the logical way to do it, even though acpi cannot be a module
due to these config options being bool.  Those parts of ACPI which can
be modular are not built into the acpi "module".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/Makefile
drivers/acpi/debug.c
drivers/acpi/power.c
drivers/acpi/system.c

index b130ea0d0759a3f95c8b81d3c203e4bdea1c5820..13b611e7eade100b413d8fba9502a394ab22ed61 100644 (file)
@@ -14,48 +14,52 @@ obj-$(CONFIG_X86)           += blacklist.o
 #
 # ACPI Core Subsystem (Interpreter)
 #
-obj-y                          += osl.o utils.o reboot.o\
+obj-y                          += acpi.o \
                                        acpica/
 
+# All the builtin files are in the "acpi." module_param namespace.
+acpi-y                         += osl.o utils.o reboot.o
+
 # sleep related files
-obj-y                          += wakeup.o
-obj-y                          += sleep.o
-obj-$(CONFIG_ACPI_SLEEP)       += proc.o
+acpi-y                         += wakeup.o
+acpi-y                         += sleep.o
+acpi-$(CONFIG_ACPI_SLEEP)      += proc.o
 
 
 #
 # ACPI Bus and Device Drivers
 #
-processor-objs += processor_core.o processor_throttling.o \
-                               processor_idle.o processor_thermal.o
-ifdef CONFIG_CPU_FREQ
-processor-objs += processor_perflib.o
+acpi-y                         += bus.o glue.o
+acpi-y                         += scan.o
+# Keep EC driver first. Initialization of others depend on it.
+acpi-y                         += ec.o
+acpi-$(CONFIG_ACPI_DOCK)       += dock.o
+acpi-y                         += pci_root.o pci_link.o pci_irq.o pci_bind.o
+acpi-y                         += power.o
+acpi-y                         += system.o event.o
+acpi-$(CONFIG_ACPI_DEBUG)      += debug.o
+acpi-$(CONFIG_ACPI_NUMA)       += numa.o
+acpi-$(CONFIG_ACPI_PROCFS_POWER) += cm_sbs.o
+ifdef CONFIG_ACPI_VIDEO
+acpi-y                         += video_detect.o
 endif
 
-obj-y                          += bus.o glue.o
-obj-y                          += scan.o
-# Keep EC driver first. Initialization of others depend on it.
-obj-y                          += ec.o
+# These are (potentially) separate modules
 obj-$(CONFIG_ACPI_AC)          += ac.o
 obj-$(CONFIG_ACPI_BATTERY)     += battery.o
 obj-$(CONFIG_ACPI_BUTTON)      += button.o
 obj-$(CONFIG_ACPI_FAN)         += fan.o
-obj-$(CONFIG_ACPI_DOCK)                += dock.o
 obj-$(CONFIG_ACPI_VIDEO)       += video.o
-ifdef CONFIG_ACPI_VIDEO
-obj-y                          += video_detect.o
-endif
-
-obj-y                          += pci_root.o pci_link.o pci_irq.o pci_bind.o
 obj-$(CONFIG_ACPI_PCI_SLOT)    += pci_slot.o
 obj-$(CONFIG_ACPI_PROCESSOR)   += processor.o
 obj-$(CONFIG_ACPI_CONTAINER)   += container.o
 obj-$(CONFIG_ACPI_THERMAL)     += thermal.o
-obj-y                          += power.o
-obj-y                          += system.o event.o
-obj-$(CONFIG_ACPI_DEBUG)       += debug.o
-obj-$(CONFIG_ACPI_NUMA)                += numa.o
-obj-$(CONFIG_ACPI_HOTPLUG_MEMORY)      += acpi_memhotplug.o
-obj-$(CONFIG_ACPI_PROCFS_POWER)        += cm_sbs.o
+obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o
 obj-$(CONFIG_ACPI_SBS)         += sbshc.o
 obj-$(CONFIG_ACPI_SBS)         += sbs.o
+
+processor-objs += processor_core.o processor_throttling.o \
+                               processor_idle.o processor_thermal.o
+ifdef CONFIG_CPU_FREQ
+processor-objs += processor_perflib.o
+endif
index 20223cbd0d1cb3544f27b1da96ecf579566ffb89..25f9c38531bde487a739e101512dee4ef4c9f252 100644 (file)
 #define _COMPONENT             ACPI_SYSTEM_COMPONENT
 ACPI_MODULE_NAME("debug");
 
-#ifdef MODULE_PARAM_PREFIX
-#undef MODULE_PARAM_PREFIX
-#endif
-#define MODULE_PARAM_PREFIX "acpi."
-
 struct acpi_dlayer {
        const char *name;
        unsigned long value;
index c926e7d4a0d619fd5b16a3b8d4806b05bba5aeeb..87361c1592d3aaec7f1be3afd35b94917e27a7a5 100644 (file)
@@ -54,10 +54,6 @@ ACPI_MODULE_NAME("power");
 #define ACPI_POWER_RESOURCE_STATE_ON   0x01
 #define ACPI_POWER_RESOURCE_STATE_UNKNOWN 0xFF
 
-#ifdef MODULE_PARAM_PREFIX
-#undef MODULE_PARAM_PREFIX
-#endif
-#define MODULE_PARAM_PREFIX "acpi."
 int acpi_power_nocheck;
 module_param_named(power_nocheck, acpi_power_nocheck, bool, 000);
 
index 391d0358a592ce6ab389687f321bfb8e0e4b62c3..a0499d00020cd57ec133a5cd48630f5ff973219c 100644 (file)
 
 #define _COMPONENT             ACPI_SYSTEM_COMPONENT
 ACPI_MODULE_NAME("system");
-#ifdef MODULE_PARAM_PREFIX
-#undef MODULE_PARAM_PREFIX
-#endif
-#define MODULE_PARAM_PREFIX "acpi."
 
 #define ACPI_SYSTEM_CLASS              "system"
 #define ACPI_SYSTEM_DEVICE_NAME                "System"