aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-02-05 20:51:13 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 17:54:59 -0500
commitf45ba776da4fe6c9a9eddd42b0fd5d1f15c260f3 (patch)
treed830c5552433b85caf93c72cae31ea67d45c330b /drivers/usb/misc
parent759f3634267a67ac90f3fa7fc06510dfd43b4e45 (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')
-rw-r--r--drivers/usb/misc/adutux.c6
-rw-r--r--drivers/usb/misc/ldusb.c2
-rw-r--r--drivers/usb/misc/legousbtower.c11
3 files changed, 11 insertions, 8 deletions
diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c
index 306e97825b36..d240de097c62 100644
--- a/drivers/usb/misc/adutux.c
+++ b/drivers/usb/misc/adutux.c
@@ -38,7 +38,7 @@ static int debug = 1;
38#define dbg(lvl, format, arg...) \ 38#define dbg(lvl, format, arg...) \
39do { \ 39do { \
40 if (debug >= lvl) \ 40 if (debug >= lvl) \
41 printk(KERN_DEBUG __FILE__ " : " format " \n", ## arg); \ 41 printk(KERN_DEBUG "%s: " format "\n", __FILE__, ##arg); \
42} while (0) 42} while (0)
43 43
44 44
@@ -132,8 +132,8 @@ static void adu_debug_data(int level, const char *function, int size,
132 if (debug < level) 132 if (debug < level)
133 return; 133 return;
134 134
135 printk(KERN_DEBUG __FILE__": %s - length = %d, data = ", 135 printk(KERN_DEBUG "%s: %s - length = %d, data = ",
136 function, size); 136 __FILE__, function, size);
137 for (i = 0; i < size; ++i) 137 for (i = 0; i < size; ++i)
138 printk("%.2x ", data[i]); 138 printk("%.2x ", data[i]);
139 printk("\n"); 139 printk("\n");
diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c
index 7c0bd13eccb2..dd41d8710043 100644
--- a/drivers/usb/misc/ldusb.c
+++ b/drivers/usb/misc/ldusb.c
@@ -798,7 +798,7 @@ static int __init ld_usb_init(void)
798 /* register this driver with the USB subsystem */ 798 /* register this driver with the USB subsystem */
799 retval = usb_register(&ld_usb_driver); 799 retval = usb_register(&ld_usb_driver);
800 if (retval) 800 if (retval)
801 err("usb_register failed for the "__FILE__" driver. Error number %d\n", retval); 801 err("usb_register failed for the %s driver. Error number %d\n", __FILE__, retval);
802 802
803 return retval; 803 return retval;
804} 804}
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 99do { \
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 }