From: Bjorn Helgaas <[email-masked]>

Seems pointless to require .c files to test CONFIG_PNP_DEBUG and
conditionally define DEBUG before including <linux/pnp.h>.  Just test
CONFIG_PNP_DEBUG directly in pnp.h.

Signed-off-by: Bjorn Helgaas <[email-masked]>
Cc: Adam Belay <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 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 -puN drivers/pnp/card.c~pnp-make-pnp_dbg-conditional-directly-on-config_pnp_debug drivers/pnp/card.c
--- devel/drivers/pnp/card.c~pnp-make-pnp_dbg-conditional-directly-on-config_pnp_debug	2005-08-01 17:04:23.000000000 -0700
+++ devel-akpm/drivers/pnp/card.c	2005-08-01 17:04:23.000000000 -0700
@@ -8,13 +8,6 @@
 #include <linux/config.h>
 #include <linux/module.h>
 #include <linux/slab.h>
-
-#ifdef CONFIG_PNP_DEBUG
-	#define DEBUG
-#else
-	#undef DEBUG
-#endif
-
 #include <linux/pnp.h>
 #include "base.h"
 
diff -puN drivers/pnp/driver.c~pnp-make-pnp_dbg-conditional-directly-on-config_pnp_debug drivers/pnp/driver.c
--- devel/drivers/pnp/driver.c~pnp-make-pnp_dbg-conditional-directly-on-config_pnp_debug	2005-08-01 17:04:23.000000000 -0700
+++ devel-akpm/drivers/pnp/driver.c	2005-08-01 17:04:23.000000000 -0700
@@ -11,13 +11,6 @@
 #include <linux/module.h>
 #include <linux/ctype.h>
 #include <linux/slab.h>
-
-#ifdef CONFIG_PNP_DEBUG
-	#define DEBUG
-#else
-	#undef DEBUG
-#endif
-
 #include <linux/pnp.h>
 #include "base.h"
 
diff -puN drivers/pnp/manager.c~pnp-make-pnp_dbg-conditional-directly-on-config_pnp_debug drivers/pnp/manager.c
--- devel/drivers/pnp/manager.c~pnp-make-pnp_dbg-conditional-directly-on-config_pnp_debug	2005-08-01 17:04:23.000000000 -0700
+++ devel-akpm/drivers/pnp/manager.c	2005-08-01 17:04:23.000000000 -0700
@@ -11,13 +11,6 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
-
-#ifdef CONFIG_PNP_DEBUG
-	#define DEBUG
-#else
-	#undef DEBUG
-#endif
-
 #include <linux/pnp.h>
 #include "base.h"
 
diff -puN drivers/pnp/pnpacpi/core.c~pnp-make-pnp_dbg-conditional-directly-on-config_pnp_debug drivers/pnp/pnpacpi/core.c
--- devel/drivers/pnp/pnpacpi/core.c~pnp-make-pnp_dbg-conditional-directly-on-config_pnp_debug	2005-08-01 17:04:23.000000000 -0700
+++ devel-akpm/drivers/pnp/pnpacpi/core.c	2005-08-01 17:04:23.000000000 -0700
@@ -19,6 +19,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  
+#include <linux/config.h>
 #include <linux/acpi.h>
 #include <linux/pnp.h>
 #include <acpi/acpi_bus.h>
diff -puN drivers/pnp/quirks.c~pnp-make-pnp_dbg-conditional-directly-on-config_pnp_debug drivers/pnp/quirks.c
--- devel/drivers/pnp/quirks.c~pnp-make-pnp_dbg-conditional-directly-on-config_pnp_debug	2005-08-01 17:04:23.000000000 -0700
+++ devel-akpm/drivers/pnp/quirks.c	2005-08-01 17:04:23.000000000 -0700
@@ -16,13 +16,6 @@
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include <linux/slab.h>
-
-#ifdef CONFIG_PNP_DEBUG
-	#define DEBUG
-#else
-	#undef DEBUG
-#endif
-
 #include <linux/pnp.h>
 #include "base.h"
 
diff -puN drivers/pnp/support.c~pnp-make-pnp_dbg-conditional-directly-on-config_pnp_debug drivers/pnp/support.c
--- devel/drivers/pnp/support.c~pnp-make-pnp_dbg-conditional-directly-on-config_pnp_debug	2005-08-01 17:04:23.000000000 -0700
+++ devel-akpm/drivers/pnp/support.c	2005-08-01 17:04:23.000000000 -0700
@@ -8,13 +8,6 @@
 #include <linux/config.h>
 #include <linux/module.h>
 #include <linux/ctype.h>
-
-#ifdef CONFIG_PNP_DEBUG
-	#define DEBUG
-#else
-	#undef DEBUG
-#endif
-
 #include <linux/pnp.h>
 #include "base.h"
 
diff -puN include/linux/pnp.h~pnp-make-pnp_dbg-conditional-directly-on-config_pnp_debug include/linux/pnp.h
--- devel/include/linux/pnp.h~pnp-make-pnp_dbg-conditional-directly-on-config_pnp_debug	2005-08-01 17:04:23.000000000 -0700
+++ devel-akpm/include/linux/pnp.h	2005-08-01 17:04:23.000000000 -0700
@@ -443,7 +443,7 @@ static inline void pnp_unregister_driver
 #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)
_