* [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
* Re: [PATCH] acpi: simplify module_param namespace
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
0 siblings, 1 reply; 8+ messages in thread
From: yakui_zhao @ 2009-03-09 2:20 UTC (permalink / raw)
To: Rusty Russell
Cc: lenb@kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org
On Sat, 2009-03-07 at 10:58 +0800, Rusty Russell wrote:
> (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/
If so, it can't be guaranteed that the EC driver is initialized before
the power resource driver.
> +
> +# "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"
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] acpi: simplify module_param namespace
2009-03-09 2:20 ` yakui_zhao
@ 2009-03-10 22:57 ` Rusty Russell
2009-03-11 3:51 ` Stephen Rothwell
0 siblings, 1 reply; 8+ messages in thread
From: Rusty Russell @ 2009-03-10 22:57 UTC (permalink / raw)
To: yakui_zhao
Cc: lenb@kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org
On Monday 09 March 2009 12:50:44 yakui_zhao wrote:
> On Sat, 2009-03-07 at 10:58 +0800, Rusty Russell wrote:
> > -obj-y += osl.o utils.o reboot.o\
> > +obj-y += acpi.o \
> > acpica/
>
> If so, it can't be guaranteed that the EC driver is initialized before
> the power resource driver.
Ah, thankyou, I had not read that comment.
This version is bigger, but simpler, and doesn't change link order. It just
moves everything into the acpi module.
Subject: acpi: simplify module_param namespace
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.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
drivers/acpi/Makefile | 57 ++++++++++++++++++++++++++------------------------
drivers/acpi/debug.c | 5 ----
drivers/acpi/power.c | 4 ---
drivers/acpi/system.c | 4 ---
4 files changed, 30 insertions(+), 40 deletions(-)
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -14,13 +14,16 @@ obj-$(CONFIG_X86) += blacklist.o
#
# ACPI Core Subsystem (Interpreter)
#
-obj-y += osl.o utils.o reboot.o\
+obj-y += acpi.o \
acpica/
+# Everything below is 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
#
@@ -32,30 +35,30 @@ processor-objs += processor_perflib.o
processor-objs += processor_perflib.o
endif
-obj-y += bus.o glue.o
-obj-y += scan.o
+acpi-y += bus.o glue.o
+acpi-y += scan.o
# Keep EC driver first. Initialization of others depend on it.
-obj-y += ec.o
-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
+acpi-y += ec.o
+acpi-$(CONFIG_ACPI_AC) += ac.o
+acpi-$(CONFIG_ACPI_BATTERY) += battery.o
+acpi-$(CONFIG_ACPI_BUTTON) += button.o
+acpi-$(CONFIG_ACPI_FAN) += fan.o
+acpi-$(CONFIG_ACPI_DOCK) += dock.o
+acpi-$(CONFIG_ACPI_VIDEO) += video.o
ifdef CONFIG_ACPI_VIDEO
-obj-y += video_detect.o
+acpi-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_SBS) += sbshc.o
-obj-$(CONFIG_ACPI_SBS) += sbs.o
+acpi-y += pci_root.o pci_link.o pci_irq.o pci_bind.o
+acpi-$(CONFIG_ACPI_PCI_SLOT) += pci_slot.o
+acpi-$(CONFIG_ACPI_PROCESSOR) += processor.o
+acpi-$(CONFIG_ACPI_CONTAINER) += container.o
+acpi-$(CONFIG_ACPI_THERMAL) += thermal.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_HOTPLUG_MEMORY) += acpi_memhotplug.o
+acpi-$(CONFIG_ACPI_PROCFS_POWER) += cm_sbs.o
+acpi-$(CONFIG_ACPI_SBS) += sbshc.o
+acpi-$(CONFIG_ACPI_SBS) += 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
* Re: [PATCH] acpi: simplify module_param namespace
2009-03-10 22:57 ` Rusty Russell
@ 2009-03-11 3:51 ` Stephen Rothwell
2009-03-11 22:37 ` Rusty Russell
0 siblings, 1 reply; 8+ messages in thread
From: Stephen Rothwell @ 2009-03-11 3:51 UTC (permalink / raw)
To: Rusty Russell
Cc: yakui_zhao, lenb@kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 493 bytes --]
Hi Rusty,
On Wed, 11 Mar 2009 09:27:12 +1030 Rusty Russell <rusty@rustcorp.com.au> wrote:
>
> This version is bigger, but simpler, and doesn't change link order. It just
> moves everything into the acpi module.
So we end up with one big acpi.ko module instead of separate modules
(like battery.ko, dock.ko) some of which we may not have needed to
load? Just clarifying.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] acpi: simplify module_param namespace
2009-03-11 3:51 ` Stephen Rothwell
@ 2009-03-11 22:37 ` Rusty Russell
2009-04-02 21:03 ` Len Brown
0 siblings, 1 reply; 8+ messages in thread
From: Rusty Russell @ 2009-03-11 22:37 UTC (permalink / raw)
To: Stephen Rothwell
Cc: yakui_zhao, lenb@kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org
On Wednesday 11 March 2009 14:21:24 Stephen Rothwell wrote:
> Hi Rusty,
>
> On Wed, 11 Mar 2009 09:27:12 +1030 Rusty Russell <rusty@rustcorp.com.au> wrote:
> >
> > This version is bigger, but simpler, and doesn't change link order. It just
> > moves everything into the acpi module.
>
> So we end up with one big acpi.ko module instead of separate modules
> (like battery.ko, dock.ko) some of which we may not have needed to
> load? Just clarifying.
Oops. Good point.
The built-in only parts of ACPI should all be one "module". The rest should
still be separate modules.
Third time for sure!
Subject: acpi: simplify module_param namespace
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>
---
drivers/acpi/Makefile | 68 ++++++++++++++++++++++++++------------------------
drivers/acpi/debug.c | 5 ---
drivers/acpi/power.c | 4 --
drivers/acpi/system.c | 4 --
4 files changed, 36 insertions(+), 45 deletions(-)
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -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
#
+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
+
+# 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_VIDEO) += video.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-$(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
-
-obj-y += bus.o glue.o
-obj-y += scan.o
-# Keep EC driver first. Initialization of others depend on it.
-obj-y += ec.o
-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_SBS) += sbshc.o
-obj-$(CONFIG_ACPI_SBS) += 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
* Re: [PATCH] acpi: simplify module_param namespace
2009-03-11 22:37 ` Rusty Russell
@ 2009-04-02 21:03 ` Len Brown
2009-04-02 21:26 ` Sam Ravnborg
0 siblings, 1 reply; 8+ messages in thread
From: Len Brown @ 2009-04-02 21:03 UTC (permalink / raw)
To: Rusty Russell
Cc: Stephen Rothwell, yakui_zhao, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: ACPI: simplify module_param namespace
From: Rusty Russell <rusty@rustcorp.com.au>
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>
---
Rusty, thanks for the patch.
Here is the version i checked in, after merging on top of the acpi tree
(ec no longer depends on link order)
-Len
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
index 61675e2..e3ca48f 100644
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -14,44 +14,48 @@ 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 scan.o ec.o \
+ power.o system.o event.o
+acpi-$(CONFIG_ACPI_DOCK) += dock.o
+acpi-y += pci_root.o pci_link.o pci_irq.o pci_bind.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 scan.o ec.o \
- power.o system.o event.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-$(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
diff --git a/drivers/acpi/debug.c b/drivers/acpi/debug.c
index 9cb189f..a8287be 100644
--- a/drivers/acpi/debug.c
+++ b/drivers/acpi/debug.c
@@ -13,11 +13,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;
unsigned long value;
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index 11968ba..56665a6 100644
--- 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
index 44be75e..da51f05 100644
--- 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 related [flat|nested] 8+ messages in thread
* Re: [PATCH] acpi: simplify module_param namespace
2009-04-02 21:03 ` Len Brown
@ 2009-04-02 21:26 ` Sam Ravnborg
2009-04-03 2:44 ` Len Brown
0 siblings, 1 reply; 8+ messages in thread
From: Sam Ravnborg @ 2009-04-02 21:26 UTC (permalink / raw)
To: Len Brown
Cc: Rusty Russell, Stephen Rothwell, yakui_zhao,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
> +
> +processor-objs += processor_core.o processor_throttling.o \
> + processor_idle.o processor_thermal.o
> +ifdef CONFIG_CPU_FREQ
> +processor-objs += processor_perflib.o
> +endif
It would be nicer to do:
processor-y := processor_core.o processor_throttling.o
processor-y += processor_idle.o processor_thermal.o
processor-$(CONFIG_CPU_FREQ) += processor_perflib.o
Assuming processor-objs was not assinged before in this file.
Sam
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] acpi: simplify module_param namespace
2009-04-02 21:26 ` Sam Ravnborg
@ 2009-04-03 2:44 ` Len Brown
0 siblings, 0 replies; 8+ messages in thread
From: Len Brown @ 2009-04-03 2:44 UTC (permalink / raw)
To: Sam Ravnborg
Cc: Rusty Russell, Stephen Rothwell, yakui_zhao,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
On Thu, 2 Apr 2009, Sam Ravnborg wrote:
> > +
> > +processor-objs += processor_core.o processor_throttling.o \
> > + processor_idle.o processor_thermal.o
> > +ifdef CONFIG_CPU_FREQ
> > +processor-objs += processor_perflib.o
> > +endif
>
> It would be nicer to do:
> processor-y := processor_core.o processor_throttling.o
> processor-y += processor_idle.o processor_thermal.o
> processor-$(CONFIG_CPU_FREQ) += processor_perflib.o
>
> Assuming processor-objs was not assinged before in this file.
>
> Sam
Can-do.
In Rusty's defense, these lines were in his patch simply because he moved
them.
thanks,
Len Brown, Intel Open Source Technology Center
^ 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;
as well as URLs for NNTP newsgroup(s).