diff options
author | Joe Perches <joe@perches.com> | 2010-02-05 20:51:13 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-02 17:54:59 -0500 |
commit | f45ba776da4fe6c9a9eddd42b0fd5d1f15c260f3 (patch) | |
tree | d830c5552433b85caf93c72cae31ea67d45c330b /drivers/usb/misc/legousbtower.c | |
parent | 759f3634267a67ac90f3fa7fc06510dfd43b4e45 (diff) |
USB: Convert concatenated __FILE__ to %s, __FILE__
Reduces string space a bit
Neaten a macro redefine of dbg
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc/legousbtower.c')
-rw-r--r-- | drivers/usb/misc/legousbtower.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c index 3d4378fb4410..8547bf9e3175 100644 --- a/drivers/usb/misc/legousbtower.c +++ b/drivers/usb/misc/legousbtower.c | |||
@@ -95,8 +95,11 @@ | |||
95 | 95 | ||
96 | /* Use our own dbg macro */ | 96 | /* Use our own dbg macro */ |
97 | #undef dbg | 97 | #undef dbg |
98 | #define dbg(lvl, format, arg...) do { if (debug >= lvl) printk(KERN_DEBUG __FILE__ ": " format "\n", ## arg); } while (0) | 98 | #define dbg(lvl, format, arg...) \ |
99 | 99 | do { \ | |
100 | if (debug >= lvl) \ | ||
101 | printk(KERN_DEBUG "%s: " format "\n", __FILE__, ##arg); \ | ||
102 | } while (0) | ||
100 | 103 | ||
101 | /* Version Information */ | 104 | /* Version Information */ |
102 | #define DRIVER_VERSION "v0.96" | 105 | #define DRIVER_VERSION "v0.96" |
@@ -302,7 +305,7 @@ static inline void lego_usb_tower_debug_data (int level, const char *function, i | |||
302 | if (debug < level) | 305 | if (debug < level) |
303 | return; | 306 | return; |
304 | 307 | ||
305 | printk (KERN_DEBUG __FILE__": %s - length = %d, data = ", function, size); | 308 | printk (KERN_DEBUG "%s: %s - length = %d, data = ", __FILE__, function, size); |
306 | for (i = 0; i < size; ++i) { | 309 | for (i = 0; i < size; ++i) { |
307 | printk ("%.2x ", data[i]); | 310 | printk ("%.2x ", data[i]); |
308 | } | 311 | } |
@@ -1055,7 +1058,7 @@ static int __init lego_usb_tower_init(void) | |||
1055 | /* register this driver with the USB subsystem */ | 1058 | /* register this driver with the USB subsystem */ |
1056 | result = usb_register(&tower_driver); | 1059 | result = usb_register(&tower_driver); |
1057 | if (result < 0) { | 1060 | if (result < 0) { |
1058 | err("usb_register failed for the "__FILE__" driver. Error number %d", result); | 1061 | err("usb_register failed for the %s driver. Error number %d", __FILE__, result); |
1059 | retval = -1; | 1062 | retval = -1; |
1060 | goto exit; | 1063 | goto exit; |
1061 | } | 1064 | } |