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

[PATCH] USB: hcd uses EXTRA_CFLAGS for -DDEBUG

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>

authored by

David Brownell and committed by
Greg Kroah-Hartman
c9a50cc9 704aa0b7

+7 -34
+4
drivers/usb/host/Makefile
··· 2 2 # Makefile for USB Host Controller Drivers 3 3 # 4 4 5 + ifeq ($(CONFIG_USB_DEBUG),y) 6 + EXTRA_CFLAGS += -DDEBUG 7 + endif 8 + 5 9 obj-$(CONFIG_PCI) += pci-quirks.o 6 10 7 11 obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o
-7
drivers/usb/host/ehci-hcd.c
··· 17 17 */ 18 18 19 19 #include <linux/config.h> 20 - 21 - #ifdef CONFIG_USB_DEBUG 22 - #define DEBUG 23 - #else 24 - #undef DEBUG 25 - #endif 26 - 27 20 #include <linux/module.h> 28 21 #include <linux/pci.h> 29 22 #include <linux/dmapool.h>
-7
drivers/usb/host/ohci-hcd.c
··· 75 75 */ 76 76 77 77 #include <linux/config.h> 78 - 79 - #ifdef CONFIG_USB_DEBUG 80 - # define DEBUG 81 - #else 82 - # undef DEBUG 83 - #endif 84 - 85 78 #include <linux/module.h> 86 79 #include <linux/moduleparam.h> 87 80 #include <linux/pci.h>
-6
drivers/usb/host/pci-quirks.c
··· 9 9 */ 10 10 11 11 #include <linux/config.h> 12 - #ifdef CONFIG_USB_DEBUG 13 - #define DEBUG 14 - #else 15 - #undef DEBUG 16 - #endif 17 - 18 12 #include <linux/types.h> 19 13 #include <linux/kernel.h> 20 14 #include <linux/pci.h>
-7
drivers/usb/host/sl811-hcd.c
··· 32 32 #undef PACKET_TRACE 33 33 34 34 #include <linux/config.h> 35 - 36 - #ifdef CONFIG_USB_DEBUG 37 - # define DEBUG 38 - #else 39 - # undef DEBUG 40 - #endif 41 - 42 35 #include <linux/module.h> 43 36 #include <linux/moduleparam.h> 44 37 #include <linux/kernel.h>
+3 -2
drivers/usb/host/sl811_cs.c
··· 38 38 /* MACROS */ 39 39 /*====================================================================*/ 40 40 41 - #if defined(DEBUG) || defined(CONFIG_USB_DEBUG) || defined(PCMCIA_DEBUG) 41 + #if defined(DEBUG) || defined(PCMCIA_DEBUG) 42 42 43 43 static int pc_debug = 0; 44 44 module_param(pc_debug, int, 0644); ··· 129 129 resources[2].end = base_addr + 1; 130 130 131 131 /* The driver core will probe for us. We know sl811-hcd has been 132 - * initialized already because of the link order dependency. 132 + * initialized already because of the link order dependency created 133 + * by referencing "sl811h_driver". 133 134 */ 134 135 platform_dev.name = sl811h_driver.name; 135 136 return platform_device_register(&platform_dev);
-5
drivers/usb/host/uhci-hcd.c
··· 23 23 */ 24 24 25 25 #include <linux/config.h> 26 - #ifdef CONFIG_USB_DEBUG 27 - #define DEBUG 28 - #else 29 - #undef DEBUG 30 - #endif 31 26 #include <linux/module.h> 32 27 #include <linux/pci.h> 33 28 #include <linux/kernel.h>