From 654f31189e550cd5924b786487a5d93d9feaada9 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 17 Nov 2005 09:48:09 -0800 Subject: [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 Signed-off-by: Linus Torvalds --- drivers/usb/misc/Makefile | 6 +++++- drivers/usb/misc/auerswald.c | 1 - drivers/usb/misc/phidgetservo.c | 3 --- drivers/usb/misc/rio500.c | 2 +- drivers/usb/misc/usbled.c | 3 --- drivers/usb/misc/usbtest.c | 3 --- drivers/usb/misc/uss720.c | 2 -- 7 files changed, 6 insertions(+), 14 deletions(-) (limited to 'drivers/usb/misc') diff --git a/drivers/usb/misc/Makefile b/drivers/usb/misc/Makefile index 862e40a83689..6c693bc68e2e 100644 --- a/drivers/usb/misc/Makefile +++ b/drivers/usb/misc/Makefile @@ -18,4 +18,8 @@ obj-$(CONFIG_USB_RIO500) += rio500.o obj-$(CONFIG_USB_TEST) += usbtest.o obj-$(CONFIG_USB_USS720) += uss720.o -obj-$(CONFIG_USB_SISUSBVGA) += sisusbvga/ \ No newline at end of file +obj-$(CONFIG_USB_SISUSBVGA) += sisusbvga/ + +ifeq ($(CONFIG_USB_DEBUG),y) +EXTRA_CFLAGS += -DDEBUG +endif diff --git a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c index 5f33f7c64885..2a28ceeaa66a 100644 --- a/drivers/usb/misc/auerswald.c +++ b/drivers/usb/misc/auerswald.c @@ -30,7 +30,6 @@ #include #include #include -#undef DEBUG /* include debug macros until it's done */ #include /*-------------------------------------------------------------------*/ diff --git a/drivers/usb/misc/phidgetservo.c b/drivers/usb/misc/phidgetservo.c index b84eda631ab5..a30d4a6ee824 100644 --- a/drivers/usb/misc/phidgetservo.c +++ b/drivers/usb/misc/phidgetservo.c @@ -26,9 +26,6 @@ */ #include -#ifdef CONFIG_USB_DEBUG -#define DEBUG 1 -#endif #include #include #include diff --git a/drivers/usb/misc/rio500.c b/drivers/usb/misc/rio500.c index 7d02d8ec6b1a..9590dbac5d9a 100644 --- a/drivers/usb/misc/rio500.c +++ b/drivers/usb/misc/rio500.c @@ -393,7 +393,7 @@ read_rio(struct file *file, char __user *buffer, size_t count, loff_t * ppos) ibuf, this_read, &partial, 8000); - dbg(KERN_DEBUG "read stats: result:%d this_read:%u partial:%u", + dbg("read stats: result:%d this_read:%u partial:%u", result, this_read, partial); if (partial) { diff --git a/drivers/usb/misc/usbled.c b/drivers/usb/misc/usbled.c index f6ba4c788dbc..3c93921cb6b3 100644 --- a/drivers/usb/misc/usbled.c +++ b/drivers/usb/misc/usbled.c @@ -10,9 +10,6 @@ */ #include -#ifdef CONFIG_USB_DEBUG - #define DEBUG 1 -#endif #include #include #include diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index 2997f558159b..605a2afe34ed 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c @@ -1,7 +1,4 @@ #include -#if !defined (DEBUG) && defined (CONFIG_USB_DEBUG) -# define DEBUG -#endif #include #include #include diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c index 0592cb5e6c4d..1cabe7ed91f5 100644 --- a/drivers/usb/misc/uss720.c +++ b/drivers/usb/misc/uss720.c @@ -41,8 +41,6 @@ /*****************************************************************************/ -#define DEBUG - #include #include #include -- cgit v1.2.3