Subject: [PATCH] [acpi driver model] Add debugging config option for ACPI driver model. - Add CONFIG_ACPI_DRIVER_MODEL_DEBUG. - Pass -DDEBUG on compile when that is set. Signed-off-by: Patrick Mochel --- drivers/acpi/drivers/Kconfig | 15 +++++++++++++++ drivers/acpi/drivers/core/Makefile | 6 ++++++ drivers/acpi/drivers/core/core.h | 2 -- 3 files changed, 21 insertions(+), 2 deletions(-) applies-to: 88ec399ca79b48a09c1c1c70d52c600ea187a9bc 4efbdcf885a7d52fa6408a0222d1ed58fc478ad9 diff --git a/drivers/acpi/drivers/Kconfig b/drivers/acpi/drivers/Kconfig index e505b85..5b95135 100644 --- a/drivers/acpi/drivers/Kconfig +++ b/drivers/acpi/drivers/Kconfig @@ -19,5 +19,20 @@ config ACPI_DRIVER_MODEL The old (Legacy) drivers may still be used, even with this option enabled, so please say 'Y' here. + +config ACPI_DRIVER_MODEL_DEBUG + bool "Enable debugging in ACPI Driver Model" + default n + ---help--- + + Selecting this option enables a lot of debugging output to be + printed to console for each device and each driver that is + reigstered with the ACPI driver model. + + You probably want to say 'N' here, unless you are developing + an extension to the ACPI driver model core, or are debugging + it for some reason. + + endmenu diff --git a/drivers/acpi/drivers/core/Makefile b/drivers/acpi/drivers/core/Makefile index cd7c779..0695d46 100644 --- a/drivers/acpi/drivers/core/Makefile +++ b/drivers/acpi/drivers/core/Makefile @@ -2,3 +2,9 @@ obj-y := bus.o device.o driver.o obj-y += lib.o + +ifeq ($(CONFIG_ACPI_DRIVER_MODEL_DEBUG),y) +EXTRA_CFLAGS += -DDEBUG +endif + + diff --git a/drivers/acpi/drivers/core/core.h b/drivers/acpi/drivers/core/core.h index fcdd6f5..6376822 100644 --- a/drivers/acpi/drivers/core/core.h +++ b/drivers/acpi/drivers/core/core.h @@ -1,7 +1,5 @@ #include -#define DEBUG - #ifdef DEBUG #define dbg(fmt, ...) printk(PREFIX "core: " fmt "\n", ## __VA_ARGS__) #else --- 0.99.9.GIT