diff --git a/drivers/usb/atm/Makefile b/drivers/usb/atm/Makefile index 751f297be2ef3ea275104858d111b08c17e55219..85099718c6837d96ccafe58035613a73aa6d02bb 100644 --- a/drivers/usb/atm/Makefile +++ b/drivers/usb/atm/Makefile @@ -6,3 +6,7 @@ obj-$(CONFIG_USB_CXACRU) += cxacru.o obj-$(CONFIG_USB_SPEEDTOUCH) += speedtch.o obj-$(CONFIG_USB_ATM) += usbatm.o obj-$(CONFIG_USB_XUSBATM) += xusbatm.o + +ifeq ($(CONFIG_USB_DEBUG),y) +EXTRA_CFLAGS += -DDEBUG +endif diff --git a/drivers/usb/atm/usbatm.h b/drivers/usb/atm/usbatm.h index 936646457935a3af6aba0750ef27a00e08a2208d..1adacd60d713fc24815cd8fd1141d3852ba79e33 100644 --- a/drivers/usb/atm/usbatm.h +++ b/drivers/usb/atm/usbatm.h @@ -27,14 +27,9 @@ #include /* -#define DEBUG #define VERBOSE_DEBUG */ -#if !defined (DEBUG) && defined (CONFIG_USB_DEBUG) -# define DEBUG -#endif - #include #include #include diff --git a/drivers/usb/core/Makefile b/drivers/usb/core/Makefile index dd1c4d2a0c3122bdca2776e78e1bd2667288abe7..86d5c380892d08efc4eb556031ddb3afe038ba03 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 57e800ac3cee80890eed1871dff6d7093e699bc9..419c9943a7cbde9428aef14df1f266bd7e32c142 100644 --- a/drivers/usb/core/buffer.c +++ b/drivers/usb/core/buffer.c @@ -15,14 +15,6 @@ #include #include #include - - -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif - #include #include "hcd.h" diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index 993019500cc38fa6756e7381db6afa5c1361a77d..a9d89c78cc2087f1140b6d89613a1d065d0201cc 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c @@ -1,9 +1,4 @@ #include - -#ifdef CONFIG_USB_DEBUG -#define DEBUG -#endif - #include #include #include diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c index e695308095ae8cbae7a9b131c93bd5a506b9c1dd..37b13368c8145c9ca8522aab5d074d30dc3eb42f 100644 --- a/drivers/usb/core/file.c +++ b/drivers/usb/core/file.c @@ -19,12 +19,6 @@ #include #include #include - -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif #include #include "usb.h" diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index 84d9e69329bb94de3e710d53fe70e4d65cc2f9f8..7feb829362d63212d5383e6aba652373036e5150 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c @@ -17,13 +17,6 @@ */ #include - -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif - #include #include #include diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 6c7ca5b08cd60c86dc51f35226bcfdf7ffa7cdc1..5e5f65a475ab95c2d50b372d70d4f5533ad98f6e 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -23,11 +23,6 @@ */ #include - -#ifdef CONFIG_USB_DEBUG -#define DEBUG -#endif - #include #include #include diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 256d9f6987156d32dbed6a2706bfcc7021dcbf86..840727948d846aa12eb476e4ba5dd07f71f1a2ae 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -9,11 +9,6 @@ */ #include -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif #include #include #include diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 208c6bd83a8369f840e754aeafe277a452016d16..fe74f99ca5f4bb8dc5f981cce78e86115702c3d2 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -3,13 +3,6 @@ */ #include - -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif - #include /* for scatterlist macros */ #include #include diff --git a/drivers/usb/core/notify.c b/drivers/usb/core/notify.c index 37da059eced741a78ca43ac275a5eba9af120c8e..fbbebab52fbd1fbfa23b3d7d48618905067d9424 100644 --- a/drivers/usb/core/notify.c +++ b/drivers/usb/core/notify.c @@ -12,13 +12,7 @@ #include #include #include -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif #include - #include "usb.h" diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index edd83e0144522700d67dd51621d88e0f4a54a1d6..71d881327e88e0aa05611a7acd3967ec1b24b4c4 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c @@ -12,14 +12,7 @@ #include #include - -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif #include - #include "usb.h" /* endpoint stuff */ diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c index f2a1fed2a8024419e76e477fdd57bd8e55792f25..081796726b951bf449b8b827b970cf7eec1b8571 100644 --- a/drivers/usb/core/urb.c +++ b/drivers/usb/core/urb.c @@ -4,12 +4,6 @@ #include #include #include - -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif #include #include "hcd.h" diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 0eefff7bcb3c72cc1daa47a6516edaa90523f6f4..e197ce9353de0f4591ad38861413b7ceb1b66593 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -22,13 +22,6 @@ */ #include - -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif - #include #include #include diff --git a/drivers/usb/input/Makefile b/drivers/usb/input/Makefile index 5e03b93f29f66a8dd42278f3c1941bee5d0c2e96..07cb17db42fc1eb8d473649f45873f43d9d821b5 100644 --- a/drivers/usb/input/Makefile +++ b/drivers/usb/input/Makefile @@ -42,3 +42,7 @@ obj-$(CONFIG_USB_ACECAD) += acecad.o obj-$(CONFIG_USB_YEALINK) += yealink.o obj-$(CONFIG_USB_XPAD) += xpad.o obj-$(CONFIG_USB_APPLETOUCH) += appletouch.o + +ifeq ($(CONFIG_USB_DEBUG),y) +EXTRA_CFLAGS += -DDEBUG +endif diff --git a/drivers/usb/input/itmtouch.c b/drivers/usb/input/itmtouch.c index 3b581853cf101d6b24962a8fb6d5c9a13513727e..4a50acb39d29acd9ebcdb470f482e402027719ac 100644 --- a/drivers/usb/input/itmtouch.c +++ b/drivers/usb/input/itmtouch.c @@ -40,13 +40,6 @@ *****************************************************************************/ #include - -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif - #include #include #include diff --git a/drivers/usb/input/keyspan_remote.c b/drivers/usb/input/keyspan_remote.c index 5b8d65f62abf20af059be248627f83fe712baf1a..a32cfe51b77de11236b98199ba00461784f479d6 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) * though so it's not too big a deal */ if (dev->data.pos >= dev->data.len) { - dev_dbg(&dev->udev, "%s - Error ran out of data. pos: %d, len: %d\n", + dev_dbg(&dev->udev->dev, + "%s - Error ran out of data. pos: %d, len: %d\n", __FUNCTION__, dev->data.pos, dev->data.len); return -1; } @@ -306,7 +307,7 @@ static void keyspan_check_data(struct usb_keyspan *remote, struct pt_regs *regs) err("Bad message recieved, no stop bit found.\n"); } - dev_dbg(&remote->udev, + dev_dbg(&remote->udev->dev, "%s found valid message: system: %d, button: %d, toggle: %d\n", __FUNCTION__, message.system, message.button, message.toggle); diff --git a/drivers/usb/input/mtouchusb.c b/drivers/usb/input/mtouchusb.c index 7fce526560ca0f396496a4cd3d9c1f154404c7a3..52cc18cd247d63e25f773c028813391410848a11 100644 --- a/drivers/usb/input/mtouchusb.c +++ b/drivers/usb/input/mtouchusb.c @@ -40,13 +40,6 @@ *****************************************************************************/ #include - -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif - #include #include #include diff --git a/drivers/usb/input/pid.c b/drivers/usb/input/pid.c index dca5ee93a4efc8e1d2e386354deac8ad129fb33a..19e015d171aab767a7df15582dded3958b7b8feb 100644 --- a/drivers/usb/input/pid.c +++ b/drivers/usb/input/pid.c @@ -37,8 +37,6 @@ #include "hid.h" #include "pid.h" -#define DEBUG - #define CHECK_OWNERSHIP(i, hid_pid) \ ((i) < FF_EFFECTS_MAX && i >= 0 && \ 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 0043e6ebcd1f0ada7cc751bab444e92fae6b6e03..7420c6b84284d34cfbad641216ce056d49f852aa 100644 --- a/drivers/usb/input/touchkitusb.c +++ b/drivers/usb/input/touchkitusb.c @@ -30,10 +30,6 @@ #include #include #include - -#if !defined(DEBUG) && defined(CONFIG_USB_DEBUG) -#define DEBUG -#endif #include #include diff --git a/drivers/usb/misc/Makefile b/drivers/usb/misc/Makefile index 862e40a8368963ee43552c30138dbcad0b4aa1c3..6c693bc68e2e8f2ce71df7fe793c988ed3db0c17 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 5f33f7c648855f2d3b8979cccde43b429eb658e8..2a28ceeaa66a2e848e3596c41cfe8a65b0f4be5f 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 b84eda631ab58488a7efe3fe35f6041b5fe1bec1..a30d4a6ee8240237943f5ad009582ebc3a490150 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 7d02d8ec6b1a68cd71a03445151092e1494ea779..9590dbac5d9a55e78c268d77fdd87e65fa727aa5 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 f6ba4c788dbc09f7b00e9b3059e74eaa11cfebc0..3c93921cb6b38e59a8d00ff9b20929feac98a06e 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 2997f558159b12cf12e29e5348e307fbd0812aa1..605a2afe34ed614d485aea86195ef7550b073a31 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 0592cb5e6c4d65c6fdf7ecd6e7777bb145f1d4ab..1cabe7ed91f5a90386af744b3e757d3e8d15db6f 100644 --- a/drivers/usb/misc/uss720.c +++ b/drivers/usb/misc/uss720.c @@ -41,8 +41,6 @@ /*****************************************************************************/ -#define DEBUG - #include #include #include diff --git a/drivers/usb/net/Makefile b/drivers/usb/net/Makefile index 222c0495f791113970616f1dc514b8bda046cab0..a21e6eaabaf67f2f678404b48217741e8f453a8f 100644 --- a/drivers/usb/net/Makefile +++ b/drivers/usb/net/Makefile @@ -16,3 +16,7 @@ obj-$(CONFIG_USB_NET_CDC_SUBSET) += cdc_subset.o obj-$(CONFIG_USB_NET_ZAURUS) += zaurus.o obj-$(CONFIG_USB_USBNET) += usbnet.o obj-$(CONFIG_USB_ZD1201) += zd1201.o + +ifeq ($(CONFIG_USB_DEBUG),y) +EXTRA_CFLAGS += -DDEBUG +endif diff --git a/drivers/usb/net/asix.c b/drivers/usb/net/asix.c index 252a34fbb42cc24931703fcdbac29d6657942421..542120ef1fd2891015255212e4df7be1c507449c 100644 --- a/drivers/usb/net/asix.c +++ b/drivers/usb/net/asix.c @@ -23,9 +23,6 @@ // #define VERBOSE // more; success messages #include -#ifdef CONFIG_USB_DEBUG -# define DEBUG -#endif #include #include #include diff --git a/drivers/usb/net/cdc_ether.c b/drivers/usb/net/cdc_ether.c index 652b04bbf6afb3327664c14c471c0b99b586c5c1..c008c981862bfad424f70b7f33e2ff4703332454 100644 --- a/drivers/usb/net/cdc_ether.c +++ b/drivers/usb/net/cdc_ether.c @@ -21,9 +21,6 @@ // #define VERBOSE // more; success messages #include -#ifdef CONFIG_USB_DEBUG -# define DEBUG -#endif #include #include #include diff --git a/drivers/usb/net/cdc_subset.c b/drivers/usb/net/cdc_subset.c index f1730b685fd2c3e471e950e189edf03e39018a5e..f05cfb83c82d99b57d76123dc3da2d2f95d0a0c9 100644 --- a/drivers/usb/net/cdc_subset.c +++ b/drivers/usb/net/cdc_subset.c @@ -18,9 +18,6 @@ */ #include -#ifdef CONFIG_USB_DEBUG -# define DEBUG -#endif #include #include #include diff --git a/drivers/usb/net/gl620a.c b/drivers/usb/net/gl620a.c index c0f263b202a60ea70eeda768593d7ee8337b1190..2455e9a85674584c976db10942e35577c7e1cd31 100644 --- a/drivers/usb/net/gl620a.c +++ b/drivers/usb/net/gl620a.c @@ -22,9 +22,6 @@ // #define VERBOSE // more; success messages #include -#ifdef CONFIG_USB_DEBUG -# define DEBUG -#endif #include #include #include diff --git a/drivers/usb/net/net1080.c b/drivers/usb/net/net1080.c index cee55f8cf64fb5b2ff97b9f146615bcbb91e2146..b3799b1a2b0d56910ab38f2633f64ea477d2ba18 100644 --- a/drivers/usb/net/net1080.c +++ b/drivers/usb/net/net1080.c @@ -21,9 +21,6 @@ // #define VERBOSE // more; success messages #include -#ifdef CONFIG_USB_DEBUG -# define DEBUG -#endif #include #include #include diff --git a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c index 537eb181d985627d91b9fe6e0cfdcf42d9090fbc..683e3df5d607de3c191f60d04562fcebb5ff030e 100644 --- a/drivers/usb/net/pegasus.c +++ b/drivers/usb/net/pegasus.c @@ -28,8 +28,6 @@ * is out of the interrupt routine. */ -#undef DEBUG - #include #include #include diff --git a/drivers/usb/net/plusb.c b/drivers/usb/net/plusb.c index 74c2b3581c768e7c55c655f3e36cb2cefe0fc24c..89856aa0e3b8c5c5e4bd7f684ac035e66e68a56e 100644 --- a/drivers/usb/net/plusb.c +++ b/drivers/usb/net/plusb.c @@ -21,9 +21,6 @@ // #define VERBOSE // more; success messages #include -#ifdef CONFIG_USB_DEBUG -# define DEBUG -#endif #include #include #include diff --git a/drivers/usb/net/rndis_host.c b/drivers/usb/net/rndis_host.c index b5a925dc1beb2623c97d78973944f5c3157fc1bd..c0ecbab6f6ba0d311ca26d84a74896e22da7b5c8 100644 --- a/drivers/usb/net/rndis_host.c +++ b/drivers/usb/net/rndis_host.c @@ -21,9 +21,6 @@ // #define VERBOSE // more; success messages #include -#ifdef CONFIG_USB_DEBUG -# define DEBUG -#endif #include #include #include diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c index 74f05c9c84d5f545c5ba994ed5e727c654c68c6d..362d6907c9bba3d68cd54f6898581deca3c7eada 100644 --- a/drivers/usb/net/usbnet.c +++ b/drivers/usb/net/usbnet.c @@ -34,9 +34,6 @@ // #define VERBOSE // more; success messages #include -#ifdef CONFIG_USB_DEBUG -# define DEBUG -#endif #include #include #include diff --git a/drivers/usb/net/zaurus.c b/drivers/usb/net/zaurus.c index 5d4b7d55b097c8937032e335243a51e510e0dfaa..680d13957af4b27e8ffed4858eafbf8021ae861a 100644 --- a/drivers/usb/net/zaurus.c +++ b/drivers/usb/net/zaurus.c @@ -21,9 +21,6 @@ // #define VERBOSE // more; success messages #include -#ifdef CONFIG_USB_DEBUG -# define DEBUG -#endif #include #include #include