From e139aa595c5d3bd01699530cbe017dec75fdb07f Mon Sep 17 00:00:00 2001 From: Bjorn Helgaas Date: Tue, 6 Sep 2005 15:17:05 -0700 Subject: [PATCH] [PATCH] PNP: make pnp_dbg conditional directly on CONFIG_PNP_DEBUG Seems pointless to require .c files to test CONFIG_PNP_DEBUG and conditionally define DEBUG before including . Just test CONFIG_PNP_DEBUG directly in pnp.h. Signed-off-by: Bjorn Helgaas Cc: Adam Belay Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/pnp/card.c | 7 ------- drivers/pnp/driver.c | 7 ------- drivers/pnp/manager.c | 7 ------- drivers/pnp/pnpacpi/core.c | 1 + drivers/pnp/quirks.c | 7 ------- drivers/pnp/support.c | 7 ------- include/linux/pnp.h | 2 +- 7 files changed, 2 insertions(+), 36 deletions(-) diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c index 6e5229e..e95ed67 100644 --- a/drivers/pnp/card.c +++ b/drivers/pnp/card.c @@ -8,13 +8,6 @@ #include #include #include - -#ifdef CONFIG_PNP_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif - #include #include "base.h" diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c index 1d037c2..33da25f 100644 --- a/drivers/pnp/driver.c +++ b/drivers/pnp/driver.c @@ -11,13 +11,6 @@ #include #include #include - -#ifdef CONFIG_PNP_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif - #include #include "base.h" diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c index 6c510c1..94442ff 100644 --- a/drivers/pnp/manager.c +++ b/drivers/pnp/manager.c @@ -11,13 +11,6 @@ #include #include #include - -#ifdef CONFIG_PNP_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif - #include #include "base.h" diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index d3d292e..1a8915e 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c @@ -19,6 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c index 596a02d..8936b0c 100644 --- a/drivers/pnp/quirks.c +++ b/drivers/pnp/quirks.c @@ -16,13 +16,6 @@ #include #include #include - -#ifdef CONFIG_PNP_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif - #include #include "base.h" diff --git a/drivers/pnp/support.c b/drivers/pnp/support.c index b952aec..61fe998 100644 --- a/drivers/pnp/support.c +++ b/drivers/pnp/support.c @@ -8,13 +8,6 @@ #include #include #include - -#ifdef CONFIG_PNP_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif - #include #include "base.h" diff --git a/include/linux/pnp.h b/include/linux/pnp.h index 5ec2bd0..aadbac2 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h @@ -443,7 +443,7 @@ static inline void pnp_unregister_driver(struct pnp_driver *drv) { ; } #define pnp_info(format, arg...) printk(KERN_INFO "pnp: " format "\n" , ## arg) #define pnp_warn(format, arg...) printk(KERN_WARNING "pnp: " format "\n" , ## arg) -#ifdef DEBUG +#ifdef CONFIG_PNP_DEBUG #define pnp_dbg(format, arg...) printk(KERN_DEBUG "pnp: " format "\n" , ## arg) #else #define pnp_dbg(format, arg...) do {} while (0) -- 2.7.4