From david-b@pacbell.net Mon Nov 7 20:50:45 2005 From: David Brownell To: Greg KH Subject: USB: hcd uses EXTRA_CFLAGS for -DDEBUG Date: Mon, 7 Nov 2005 20:45:20 -0800 Message-Id: <200511072045.20888.david-b@pacbell.net> 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 Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/Makefile | 4 ++++ drivers/usb/host/ehci-hcd.c | 7 ------- drivers/usb/host/ohci-hcd.c | 7 ------- drivers/usb/host/pci-quirks.c | 6 ------ drivers/usb/host/sl811-hcd.c | 7 ------- drivers/usb/host/sl811_cs.c | 5 +++-- drivers/usb/host/uhci-hcd.c | 5 ----- 7 files changed, 7 insertions(+), 34 deletions(-) --- gregkh-2.6.orig/drivers/usb/host/Makefile +++ gregkh-2.6/drivers/usb/host/Makefile @@ -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 --- gregkh-2.6.orig/drivers/usb/host/uhci-hcd.c +++ gregkh-2.6/drivers/usb/host/uhci-hcd.c @@ -23,11 +23,6 @@ */ #include -#ifdef CONFIG_USB_DEBUG -#define DEBUG -#else -#undef DEBUG -#endif #include #include #include --- gregkh-2.6.orig/drivers/usb/host/ehci-hcd.c +++ gregkh-2.6/drivers/usb/host/ehci-hcd.c @@ -17,13 +17,6 @@ */ #include - -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif - #include #include #include --- gregkh-2.6.orig/drivers/usb/host/ohci-hcd.c +++ gregkh-2.6/drivers/usb/host/ohci-hcd.c @@ -75,13 +75,6 @@ */ #include - -#ifdef CONFIG_USB_DEBUG -# define DEBUG -#else -# undef DEBUG -#endif - #include #include #include --- gregkh-2.6.orig/drivers/usb/host/sl811_cs.c +++ gregkh-2.6/drivers/usb/host/sl811_cs.c @@ -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); @@ -129,7 +129,8 @@ static int sl811_hc_init(struct device * 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); --- gregkh-2.6.orig/drivers/usb/host/pci-quirks.c +++ gregkh-2.6/drivers/usb/host/pci-quirks.c @@ -9,12 +9,6 @@ */ #include -#ifdef CONFIG_USB_DEBUG -#define DEBUG -#else -#undef DEBUG -#endif - #include #include #include --- gregkh-2.6.orig/drivers/usb/host/sl811-hcd.c +++ gregkh-2.6/drivers/usb/host/sl811-hcd.c @@ -32,13 +32,6 @@ #undef PACKET_TRACE #include - -#ifdef CONFIG_USB_DEBUG -# define DEBUG -#else -# undef DEBUG -#endif - #include #include #include