Skip to content

Commit

Permalink
[PATCH] USB: hcd uses EXTRA_CFLAGS for -DDEBUG
Browse files Browse the repository at this point in the history
This modifies the HCD builds to automatically "-DDEBUG" if
CONFIG_USB_DEBUG is selected.  It's just a minor source code cleanup,
guaranteeing consistency.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
David Brownell authored and Greg Kroah-Hartman committed Jan 4, 2006
1 parent 704aa0b commit c9a50cc
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 34 deletions.
4 changes: 4 additions & 0 deletions drivers/usb/host/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# Makefile for USB Host Controller Drivers
#

ifeq ($(CONFIG_USB_DEBUG),y)
EXTRA_CFLAGS += -DDEBUG
endif

obj-$(CONFIG_PCI) += pci-quirks.o

obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o
Expand Down
7 changes: 0 additions & 7 deletions drivers/usb/host/ehci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@
*/

#include <linux/config.h>

#ifdef CONFIG_USB_DEBUG
#define DEBUG
#else
#undef DEBUG
#endif

#include <linux/module.h>
#include <linux/pci.h>
#include <linux/dmapool.h>
Expand Down
7 changes: 0 additions & 7 deletions drivers/usb/host/ohci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,6 @@
*/

#include <linux/config.h>

#ifdef CONFIG_USB_DEBUG
# define DEBUG
#else
# undef DEBUG
#endif

#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/pci.h>
Expand Down
6 changes: 0 additions & 6 deletions drivers/usb/host/pci-quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@
*/

#include <linux/config.h>
#ifdef CONFIG_USB_DEBUG
#define DEBUG
#else
#undef DEBUG
#endif

#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/pci.h>
Expand Down
7 changes: 0 additions & 7 deletions drivers/usb/host/sl811-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@
#undef PACKET_TRACE

#include <linux/config.h>

#ifdef CONFIG_USB_DEBUG
# define DEBUG
#else
# undef DEBUG
#endif

#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
Expand Down
5 changes: 3 additions & 2 deletions drivers/usb/host/sl811_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ MODULE_LICENSE("GPL");
/* MACROS */
/*====================================================================*/

#if defined(DEBUG) || defined(CONFIG_USB_DEBUG) || defined(PCMCIA_DEBUG)
#if defined(DEBUG) || defined(PCMCIA_DEBUG)

static int pc_debug = 0;
module_param(pc_debug, int, 0644);
Expand Down Expand Up @@ -129,7 +129,8 @@ static int sl811_hc_init(struct device *parent, ioaddr_t base_addr, int irq)
resources[2].end = base_addr + 1;

/* The driver core will probe for us. We know sl811-hcd has been
* initialized already because of the link order dependency.
* initialized already because of the link order dependency created
* by referencing "sl811h_driver".
*/
platform_dev.name = sl811h_driver.name;
return platform_device_register(&platform_dev);
Expand Down
5 changes: 0 additions & 5 deletions drivers/usb/host/uhci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
*/

#include <linux/config.h>
#ifdef CONFIG_USB_DEBUG
#define DEBUG
#else
#undef DEBUG
#endif
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/kernel.h>
Expand Down

0 comments on commit c9a50cc

Please sign in to comment.