[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>
This commit is contained in:
Greg Kroah-Hartman
2005-11-17 09:48:09 -08:00
committed by Linus Torvalds
parent 87cf203935
commit 654f31189e
38 changed files with 25 additions and 139 deletions

View File

@@ -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/
obj-$(CONFIG_USB_SISUSBVGA) += sisusbvga/
ifeq ($(CONFIG_USB_DEBUG),y)
EXTRA_CFLAGS += -DDEBUG
endif

View File

@@ -30,7 +30,6 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/wait.h>
#undef DEBUG /* include debug macros until it's done */
#include <linux/usb.h>
/*-------------------------------------------------------------------*/

View File

@@ -26,9 +26,6 @@
*/
#include <linux/config.h>
#ifdef CONFIG_USB_DEBUG
#define DEBUG 1
#endif
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/init.h>

View File

@@ -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) {

View File

@@ -10,9 +10,6 @@
*/
#include <linux/config.h>
#ifdef CONFIG_USB_DEBUG
#define DEBUG 1
#endif
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/init.h>

View File

@@ -1,7 +1,4 @@
#include <linux/config.h>
#if !defined (DEBUG) && defined (CONFIG_USB_DEBUG)
# define DEBUG
#endif
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/init.h>

View File

@@ -41,8 +41,6 @@
/*****************************************************************************/
#define DEBUG
#include <linux/module.h>
#include <linux/socket.h>
#include <linux/parport.h>