Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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 <linux/pnp.h>. Just test
CONFIG_PNP_DEBUG directly in pnp.h.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Adam Belay <ambx1@neo.rr.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Bjorn Helgaas and committed by
Linus Torvalds
e139aa59 486d46ae

+2 -36
-7
drivers/pnp/card.c
··· 8 8 #include <linux/config.h> 9 9 #include <linux/module.h> 10 10 #include <linux/slab.h> 11 - 12 - #ifdef CONFIG_PNP_DEBUG 13 - #define DEBUG 14 - #else 15 - #undef DEBUG 16 - #endif 17 - 18 11 #include <linux/pnp.h> 19 12 #include "base.h" 20 13
-7
drivers/pnp/driver.c
··· 11 11 #include <linux/module.h> 12 12 #include <linux/ctype.h> 13 13 #include <linux/slab.h> 14 - 15 - #ifdef CONFIG_PNP_DEBUG 16 - #define DEBUG 17 - #else 18 - #undef DEBUG 19 - #endif 20 - 21 14 #include <linux/pnp.h> 22 15 #include "base.h" 23 16
-7
drivers/pnp/manager.c
··· 11 11 #include <linux/module.h> 12 12 #include <linux/init.h> 13 13 #include <linux/kernel.h> 14 - 15 - #ifdef CONFIG_PNP_DEBUG 16 - #define DEBUG 17 - #else 18 - #undef DEBUG 19 - #endif 20 - 21 14 #include <linux/pnp.h> 22 15 #include "base.h" 23 16
+1
drivers/pnp/pnpacpi/core.c
··· 19 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 20 */ 21 21 22 + #include <linux/config.h> 22 23 #include <linux/acpi.h> 23 24 #include <linux/pnp.h> 24 25 #include <acpi/acpi_bus.h>
-7
drivers/pnp/quirks.c
··· 16 16 #include <linux/kernel.h> 17 17 #include <linux/string.h> 18 18 #include <linux/slab.h> 19 - 20 - #ifdef CONFIG_PNP_DEBUG 21 - #define DEBUG 22 - #else 23 - #undef DEBUG 24 - #endif 25 - 26 19 #include <linux/pnp.h> 27 20 #include "base.h" 28 21
-7
drivers/pnp/support.c
··· 8 8 #include <linux/config.h> 9 9 #include <linux/module.h> 10 10 #include <linux/ctype.h> 11 - 12 - #ifdef CONFIG_PNP_DEBUG 13 - #define DEBUG 14 - #else 15 - #undef DEBUG 16 - #endif 17 - 18 11 #include <linux/pnp.h> 19 12 #include "base.h" 20 13
+1 -1
include/linux/pnp.h
··· 443 443 #define pnp_info(format, arg...) printk(KERN_INFO "pnp: " format "\n" , ## arg) 444 444 #define pnp_warn(format, arg...) printk(KERN_WARNING "pnp: " format "\n" , ## arg) 445 445 446 - #ifdef DEBUG 446 + #ifdef CONFIG_PNP_DEBUG 447 447 #define pnp_dbg(format, arg...) printk(KERN_DEBUG "pnp: " format "\n" , ## arg) 448 448 #else 449 449 #define pnp_dbg(format, arg...) do {} while (0)