diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2005-11-17 12:48:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-17 14:29:55 -0500 |
commit | 654f31189e550cd5924b786487a5d93d9feaada9 (patch) | |
tree | 3502129c017607c961e396b4f32566f48436cc70 /drivers/usb/misc | |
parent | 87cf203935a646d5fb00464dc5887292da71d928 (diff) |
[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/misc')
-rw-r--r-- | drivers/usb/misc/Makefile | 6 | ||||
-rw-r--r-- | drivers/usb/misc/auerswald.c | 1 | ||||
-rw-r--r-- | drivers/usb/misc/phidgetservo.c | 3 | ||||
-rw-r--r-- | drivers/usb/misc/rio500.c | 2 | ||||
-rw-r--r-- | drivers/usb/misc/usbled.c | 3 | ||||
-rw-r--r-- | drivers/usb/misc/usbtest.c | 3 | ||||
-rw-r--r-- | drivers/usb/misc/uss720.c | 2 |
7 files changed, 6 insertions, 14 deletions
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 | |||
18 | obj-$(CONFIG_USB_TEST) += usbtest.o | 18 | obj-$(CONFIG_USB_TEST) += usbtest.o |
19 | obj-$(CONFIG_USB_USS720) += uss720.o | 19 | obj-$(CONFIG_USB_USS720) += uss720.o |
20 | 20 | ||
21 | obj-$(CONFIG_USB_SISUSBVGA) += sisusbvga/ \ No newline at end of file | 21 | obj-$(CONFIG_USB_SISUSBVGA) += sisusbvga/ |
22 | |||
23 | ifeq ($(CONFIG_USB_DEBUG),y) | ||
24 | EXTRA_CFLAGS += -DDEBUG | ||
25 | 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 @@ | |||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <linux/wait.h> | 32 | #include <linux/wait.h> |
33 | #undef DEBUG /* include debug macros until it's done */ | ||
34 | #include <linux/usb.h> | 33 | #include <linux/usb.h> |
35 | 34 | ||
36 | /*-------------------------------------------------------------------*/ | 35 | /*-------------------------------------------------------------------*/ |
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 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/config.h> | 28 | #include <linux/config.h> |
29 | #ifdef CONFIG_USB_DEBUG | ||
30 | #define DEBUG 1 | ||
31 | #endif | ||
32 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
33 | #include <linux/errno.h> | 30 | #include <linux/errno.h> |
34 | #include <linux/init.h> | 31 | #include <linux/init.h> |
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) | |||
393 | ibuf, this_read, &partial, | 393 | ibuf, this_read, &partial, |
394 | 8000); | 394 | 8000); |
395 | 395 | ||
396 | dbg(KERN_DEBUG "read stats: result:%d this_read:%u partial:%u", | 396 | dbg("read stats: result:%d this_read:%u partial:%u", |
397 | result, this_read, partial); | 397 | result, this_read, partial); |
398 | 398 | ||
399 | if (partial) { | 399 | 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 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | 12 | #include <linux/config.h> |
13 | #ifdef CONFIG_USB_DEBUG | ||
14 | #define DEBUG 1 | ||
15 | #endif | ||
16 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
17 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
18 | #include <linux/init.h> | 15 | #include <linux/init.h> |
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 @@ | |||
1 | #include <linux/config.h> | 1 | #include <linux/config.h> |
2 | #if !defined (DEBUG) && defined (CONFIG_USB_DEBUG) | ||
3 | # define DEBUG | ||
4 | #endif | ||
5 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
6 | #include <linux/errno.h> | 3 | #include <linux/errno.h> |
7 | #include <linux/init.h> | 4 | #include <linux/init.h> |
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 @@ | |||
41 | 41 | ||
42 | /*****************************************************************************/ | 42 | /*****************************************************************************/ |
43 | 43 | ||
44 | #define DEBUG | ||
45 | |||
46 | #include <linux/module.h> | 44 | #include <linux/module.h> |
47 | #include <linux/socket.h> | 45 | #include <linux/socket.h> |
48 | #include <linux/parport.h> | 46 | #include <linux/parport.h> |