Skip to content

Commit

Permalink
[PATCH] PNP: make pnp_dbg conditional directly on CONFIG_PNP_DEBUG
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bjorn Helgaas authored and Linus Torvalds committed Sep 7, 2005
1 parent 486d46a commit e139aa5
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 36 deletions.
7 changes: 0 additions & 7 deletions drivers/pnp/card.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
7 changes: 0 additions & 7 deletions drivers/pnp/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
7 changes: 0 additions & 7 deletions drivers/pnp/manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
1 change: 1 addition & 0 deletions drivers/pnp/pnpacpi/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
7 changes: 0 additions & 7 deletions drivers/pnp/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
7 changes: 0 additions & 7 deletions drivers/pnp/support.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion include/linux/pnp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e139aa5

Please sign in to comment.