diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2005-11-17 09:48:09 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-17 11:29:55 -0800 |
commit | 654f31189e550cd5924b786487a5d93d9feaada9 (patch) | |
tree | 3502129c017607c961e396b4f32566f48436cc70 /drivers/usb/core | |
parent | 87cf203935a646d5fb00464dc5887292da71d928 (diff) | |
download | op-kernel-dev-654f31189e550cd5924b786487a5d93d9feaada9.zip op-kernel-dev-654f31189e550cd5924b786487a5d93d9feaada9.tar.gz |
[PATCH] USB: move CONFIG_USB_DEBUG checks into the Makefile
This lets us remove a lot of code in the drivers that were all checking
the same thing. It also found some bugs in a few of the drivers, which
has been fixed up.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/Makefile | 4 | ||||
-rw-r--r-- | drivers/usb/core/buffer.c | 8 | ||||
-rw-r--r-- | drivers/usb/core/config.c | 5 | ||||
-rw-r--r-- | drivers/usb/core/file.c | 6 | ||||
-rw-r--r-- | drivers/usb/core/hcd-pci.c | 7 | ||||
-rw-r--r-- | drivers/usb/core/hcd.c | 5 | ||||
-rw-r--r-- | drivers/usb/core/hub.c | 5 | ||||
-rw-r--r-- | drivers/usb/core/message.c | 7 | ||||
-rw-r--r-- | drivers/usb/core/notify.c | 6 | ||||
-rw-r--r-- | drivers/usb/core/sysfs.c | 7 | ||||
-rw-r--r-- | drivers/usb/core/urb.c | 6 | ||||
-rw-r--r-- | drivers/usb/core/usb.c | 7 |
12 files changed, 4 insertions, 69 deletions
diff --git a/drivers/usb/core/Makefile b/drivers/usb/core/Makefile index dd1c4d2..86d5c38 100644 --- a/drivers/usb/core/Makefile +++ b/drivers/usb/core/Makefile @@ -14,3 +14,7 @@ ifeq ($(CONFIG_USB_DEVICEFS),y) endif obj-$(CONFIG_USB) += usbcore.o + +ifeq ($(CONFIG_USB_DEBUG),y) +EXTRA_CFLAGS += -DDEBUG +endif diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c index 57e800a..419c994 100644 --- a/drivers/usb/core/buffer.c +++ b/drivers/usb/core/buffer.c @@ -15,14 +15,6 @@ #include <asm/scatterlist.h> #include <linux/dma-mapping.h> #include <linux/dmapool.h> - - -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif - #include <linux/usb.h> #include "hcd.h" diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index 9930195..a9d89c7 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c @@ -1,9 +1,4 @@ #include <linux/config.h> - -#ifdef CONFIG_USB_DEBUG -#define DEBUG -#endif - #include <linux/usb.h> #include <linux/module.h> #include <linux/init.h> diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c index e695308..37b1336 100644 --- a/drivers/usb/core/file.c +++ b/drivers/usb/core/file.c @@ -19,12 +19,6 @@ #include <linux/module.h> #include <linux/spinlock.h> #include <linux/errno.h> - -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif #include <linux/usb.h> #include "usb.h" diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index 84d9e69..7feb829 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c @@ -17,13 +17,6 @@ */ #include <linux/config.h> - -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif - #include <linux/kernel.h> #include <linux/module.h> #include <linux/pci.h> diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 6c7ca5b..5e5f65a 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -23,11 +23,6 @@ */ #include <linux/config.h> - -#ifdef CONFIG_USB_DEBUG -#define DEBUG -#endif - #include <linux/module.h> #include <linux/version.h> #include <linux/kernel.h> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 256d9f6..8407279 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -9,11 +9,6 @@ */ #include <linux/config.h> -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif #include <linux/kernel.h> #include <linux/errno.h> #include <linux/module.h> diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 208c6bd..fe74f99 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -3,13 +3,6 @@ */ #include <linux/config.h> - -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif - #include <linux/pci.h> /* for scatterlist macros */ #include <linux/usb.h> #include <linux/module.h> diff --git a/drivers/usb/core/notify.c b/drivers/usb/core/notify.c index 37da059..fbbebab 100644 --- a/drivers/usb/core/notify.c +++ b/drivers/usb/core/notify.c @@ -12,13 +12,7 @@ #include <linux/config.h> #include <linux/kernel.h> #include <linux/notifier.h> -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif #include <linux/usb.h> - #include "usb.h" diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index edd83e0..71d8813 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c @@ -12,14 +12,7 @@ #include <linux/config.h> #include <linux/kernel.h> - -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif #include <linux/usb.h> - #include "usb.h" /* endpoint stuff */ diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c index f2a1fed..0817967 100644 --- a/drivers/usb/core/urb.c +++ b/drivers/usb/core/urb.c @@ -4,12 +4,6 @@ #include <linux/bitops.h> #include <linux/slab.h> #include <linux/init.h> - -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif #include <linux/usb.h> #include "hcd.h" diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 0eefff7..e197ce9 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -22,13 +22,6 @@ */ #include <linux/config.h> - -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif - #include <linux/module.h> #include <linux/string.h> #include <linux/bitops.h> |