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/input | |
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/input')
-rw-r--r-- | drivers/usb/input/Makefile | 4 | ||||
-rw-r--r-- | drivers/usb/input/itmtouch.c | 7 | ||||
-rw-r--r-- | drivers/usb/input/keyspan_remote.c | 5 | ||||
-rw-r--r-- | drivers/usb/input/mtouchusb.c | 7 | ||||
-rw-r--r-- | drivers/usb/input/pid.c | 2 | ||||
-rw-r--r-- | drivers/usb/input/touchkitusb.c | 4 |
6 files changed, 7 insertions, 22 deletions
diff --git a/drivers/usb/input/Makefile b/drivers/usb/input/Makefile index 5e03b93f29f6..07cb17db42fc 100644 --- a/drivers/usb/input/Makefile +++ b/drivers/usb/input/Makefile | |||
@@ -42,3 +42,7 @@ obj-$(CONFIG_USB_ACECAD) += acecad.o | |||
42 | obj-$(CONFIG_USB_YEALINK) += yealink.o | 42 | obj-$(CONFIG_USB_YEALINK) += yealink.o |
43 | obj-$(CONFIG_USB_XPAD) += xpad.o | 43 | obj-$(CONFIG_USB_XPAD) += xpad.o |
44 | obj-$(CONFIG_USB_APPLETOUCH) += appletouch.o | 44 | obj-$(CONFIG_USB_APPLETOUCH) += appletouch.o |
45 | |||
46 | ifeq ($(CONFIG_USB_DEBUG),y) | ||
47 | EXTRA_CFLAGS += -DDEBUG | ||
48 | endif | ||
diff --git a/drivers/usb/input/itmtouch.c b/drivers/usb/input/itmtouch.c index 3b581853cf10..4a50acb39d29 100644 --- a/drivers/usb/input/itmtouch.c +++ b/drivers/usb/input/itmtouch.c | |||
@@ -40,13 +40,6 @@ | |||
40 | *****************************************************************************/ | 40 | *****************************************************************************/ |
41 | 41 | ||
42 | #include <linux/config.h> | 42 | #include <linux/config.h> |
43 | |||
44 | #ifdef CONFIG_USB_DEBUG | ||
45 | #define DEBUG | ||
46 | #else | ||
47 | #undef DEBUG | ||
48 | #endif | ||
49 | |||
50 | #include <linux/kernel.h> | 43 | #include <linux/kernel.h> |
51 | #include <linux/slab.h> | 44 | #include <linux/slab.h> |
52 | #include <linux/input.h> | 45 | #include <linux/input.h> |
diff --git a/drivers/usb/input/keyspan_remote.c b/drivers/usb/input/keyspan_remote.c index 5b8d65f62abf..a32cfe51b77d 100644 --- a/drivers/usb/input/keyspan_remote.c +++ b/drivers/usb/input/keyspan_remote.c | |||
@@ -160,7 +160,8 @@ static int keyspan_load_tester(struct usb_keyspan* dev, int bits_needed) | |||
160 | * though so it's not too big a deal | 160 | * though so it's not too big a deal |
161 | */ | 161 | */ |
162 | if (dev->data.pos >= dev->data.len) { | 162 | if (dev->data.pos >= dev->data.len) { |
163 | dev_dbg(&dev->udev, "%s - Error ran out of data. pos: %d, len: %d\n", | 163 | dev_dbg(&dev->udev->dev, |
164 | "%s - Error ran out of data. pos: %d, len: %d\n", | ||
164 | __FUNCTION__, dev->data.pos, dev->data.len); | 165 | __FUNCTION__, dev->data.pos, dev->data.len); |
165 | return -1; | 166 | return -1; |
166 | } | 167 | } |
@@ -306,7 +307,7 @@ static void keyspan_check_data(struct usb_keyspan *remote, struct pt_regs *regs) | |||
306 | err("Bad message recieved, no stop bit found.\n"); | 307 | err("Bad message recieved, no stop bit found.\n"); |
307 | } | 308 | } |
308 | 309 | ||
309 | dev_dbg(&remote->udev, | 310 | dev_dbg(&remote->udev->dev, |
310 | "%s found valid message: system: %d, button: %d, toggle: %d\n", | 311 | "%s found valid message: system: %d, button: %d, toggle: %d\n", |
311 | __FUNCTION__, message.system, message.button, message.toggle); | 312 | __FUNCTION__, message.system, message.button, message.toggle); |
312 | 313 | ||
diff --git a/drivers/usb/input/mtouchusb.c b/drivers/usb/input/mtouchusb.c index 7fce526560ca..52cc18cd247d 100644 --- a/drivers/usb/input/mtouchusb.c +++ b/drivers/usb/input/mtouchusb.c | |||
@@ -40,13 +40,6 @@ | |||
40 | *****************************************************************************/ | 40 | *****************************************************************************/ |
41 | 41 | ||
42 | #include <linux/config.h> | 42 | #include <linux/config.h> |
43 | |||
44 | #ifdef CONFIG_USB_DEBUG | ||
45 | #define DEBUG | ||
46 | #else | ||
47 | #undef DEBUG | ||
48 | #endif | ||
49 | |||
50 | #include <linux/kernel.h> | 43 | #include <linux/kernel.h> |
51 | #include <linux/slab.h> | 44 | #include <linux/slab.h> |
52 | #include <linux/input.h> | 45 | #include <linux/input.h> |
diff --git a/drivers/usb/input/pid.c b/drivers/usb/input/pid.c index dca5ee93a4ef..19e015d171aa 100644 --- a/drivers/usb/input/pid.c +++ b/drivers/usb/input/pid.c | |||
@@ -37,8 +37,6 @@ | |||
37 | #include "hid.h" | 37 | #include "hid.h" |
38 | #include "pid.h" | 38 | #include "pid.h" |
39 | 39 | ||
40 | #define DEBUG | ||
41 | |||
42 | #define CHECK_OWNERSHIP(i, hid_pid) \ | 40 | #define CHECK_OWNERSHIP(i, hid_pid) \ |
43 | ((i) < FF_EFFECTS_MAX && i >= 0 && \ | 41 | ((i) < FF_EFFECTS_MAX && i >= 0 && \ |
44 | test_bit(FF_PID_FLAGS_USED, &hid_pid->effects[(i)].flags) && \ | 42 | test_bit(FF_PID_FLAGS_USED, &hid_pid->effects[(i)].flags) && \ |
diff --git a/drivers/usb/input/touchkitusb.c b/drivers/usb/input/touchkitusb.c index 0043e6ebcd1f..7420c6b84284 100644 --- a/drivers/usb/input/touchkitusb.c +++ b/drivers/usb/input/touchkitusb.c | |||
@@ -30,10 +30,6 @@ | |||
30 | #include <linux/input.h> | 30 | #include <linux/input.h> |
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
33 | |||
34 | #if !defined(DEBUG) && defined(CONFIG_USB_DEBUG) | ||
35 | #define DEBUG | ||
36 | #endif | ||
37 | #include <linux/usb.h> | 33 | #include <linux/usb.h> |
38 | #include <linux/usb_input.h> | 34 | #include <linux/usb_input.h> |
39 | 35 | ||