public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] acpi: simplify module_param namespace
@ 2009-03-07  2:58 Rusty Russell
  2009-03-09  2:20 ` yakui_zhao
  0 siblings, 1 reply; 8+ messages in thread
From: Rusty Russell @ 2009-03-07  2:58 UTC (permalink / raw)
  To: lenb; +Cc: linux-acpi, linux-kernel

(I've been holding this for a while: if you really hate it I'll delete it)

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.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
 drivers/acpi/Makefile |   10 ++++++----
 drivers/acpi/debug.c  |    5 -----
 drivers/acpi/power.c  |    4 ----
 drivers/acpi/system.c |    4 ----
 4 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -14,8 +14,13 @@ obj-$(CONFIG_X86)		+= blacklist.o
 #
 # ACPI Core Subsystem (Interpreter)
 #
-obj-y				+= osl.o utils.o reboot.o\
+obj-y				+= acpi.o \
 					acpica/
+
+# "acpi." module_param namespace.
+acpi-y				+= osl.o utils.o reboot.o power.o \
+					system.o event.o
+acpi-$(CONFIG_ACPI_DEBUG)	+= debug.o
 
 # sleep related files
 obj-y				+= wakeup.o
@@ -51,9 +56,6 @@ obj-$(CONFIG_ACPI_PROCESSOR)	+= processo
 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
diff --git a/drivers/acpi/debug.c b/drivers/acpi/debug.c
--- a/drivers/acpi/debug.c
+++ b/drivers/acpi/debug.c
@@ -12,11 +12,6 @@
 
 #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;
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -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);
 
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c
--- a/drivers/acpi/system.c
+++ b/drivers/acpi/system.c
@@ -33,10 +33,6 @@
 
 #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"

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-04-03  2:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-07  2:58 [PATCH] acpi: simplify module_param namespace Rusty Russell
2009-03-09  2:20 ` yakui_zhao
2009-03-10 22:57   ` Rusty Russell
2009-03-11  3:51     ` Stephen Rothwell
2009-03-11 22:37       ` Rusty Russell
2009-04-02 21:03         ` Len Brown
2009-04-02 21:26           ` Sam Ravnborg
2009-04-03  2:44             ` Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox