aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/core/devices.c')
-rw-r--r--drivers/usb/core/devices.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
index 83e815d3cd52..2684e15b813b 100644
--- a/drivers/usb/core/devices.c
+++ b/drivers/usb/core/devices.c
@@ -67,45 +67,45 @@
67/* Define ALLOW_SERIAL_NUMBER if you want to see the serial number of devices */ 67/* Define ALLOW_SERIAL_NUMBER if you want to see the serial number of devices */
68#define ALLOW_SERIAL_NUMBER 68#define ALLOW_SERIAL_NUMBER
69 69
70static char *format_topo = 70static const char *format_topo =
71/* T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=ddd MxCh=dd */ 71/* T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=ddd MxCh=dd */
72"\nT: Bus=%2.2d Lev=%2.2d Prnt=%2.2d Port=%2.2d Cnt=%2.2d Dev#=%3d Spd=%3s MxCh=%2d\n"; 72"\nT: Bus=%2.2d Lev=%2.2d Prnt=%2.2d Port=%2.2d Cnt=%2.2d Dev#=%3d Spd=%3s MxCh=%2d\n";
73 73
74static char *format_string_manufacturer = 74static const char *format_string_manufacturer =
75/* S: Manufacturer=xxxx */ 75/* S: Manufacturer=xxxx */
76 "S: Manufacturer=%.100s\n"; 76 "S: Manufacturer=%.100s\n";
77 77
78static char *format_string_product = 78static const char *format_string_product =
79/* S: Product=xxxx */ 79/* S: Product=xxxx */
80 "S: Product=%.100s\n"; 80 "S: Product=%.100s\n";
81 81
82#ifdef ALLOW_SERIAL_NUMBER 82#ifdef ALLOW_SERIAL_NUMBER
83static char *format_string_serialnumber = 83static const char *format_string_serialnumber =
84/* S: SerialNumber=xxxx */ 84/* S: SerialNumber=xxxx */
85 "S: SerialNumber=%.100s\n"; 85 "S: SerialNumber=%.100s\n";
86#endif 86#endif
87 87
88static char *format_bandwidth = 88static const char *format_bandwidth =
89/* B: Alloc=ddd/ddd us (xx%), #Int=ddd, #Iso=ddd */ 89/* B: Alloc=ddd/ddd us (xx%), #Int=ddd, #Iso=ddd */
90 "B: Alloc=%3d/%3d us (%2d%%), #Int=%3d, #Iso=%3d\n"; 90 "B: Alloc=%3d/%3d us (%2d%%), #Int=%3d, #Iso=%3d\n";
91 91
92static char *format_device1 = 92static const char *format_device1 =
93/* D: Ver=xx.xx Cls=xx(sssss) Sub=xx Prot=xx MxPS=dd #Cfgs=dd */ 93/* D: Ver=xx.xx Cls=xx(sssss) Sub=xx Prot=xx MxPS=dd #Cfgs=dd */
94 "D: Ver=%2x.%02x Cls=%02x(%-5s) Sub=%02x Prot=%02x MxPS=%2d #Cfgs=%3d\n"; 94 "D: Ver=%2x.%02x Cls=%02x(%-5s) Sub=%02x Prot=%02x MxPS=%2d #Cfgs=%3d\n";
95 95
96static char *format_device2 = 96static const char *format_device2 =
97/* P: Vendor=xxxx ProdID=xxxx Rev=xx.xx */ 97/* P: Vendor=xxxx ProdID=xxxx Rev=xx.xx */
98 "P: Vendor=%04x ProdID=%04x Rev=%2x.%02x\n"; 98 "P: Vendor=%04x ProdID=%04x Rev=%2x.%02x\n";
99 99
100static char *format_config = 100static const char *format_config =
101/* C: #Ifs=dd Cfg#=dd Atr=xx MPwr=dddmA */ 101/* C: #Ifs=dd Cfg#=dd Atr=xx MPwr=dddmA */
102 "C:%c #Ifs=%2d Cfg#=%2d Atr=%02x MxPwr=%3dmA\n"; 102 "C:%c #Ifs=%2d Cfg#=%2d Atr=%02x MxPwr=%3dmA\n";
103 103
104static char *format_iface = 104static const char *format_iface =
105/* I: If#=dd Alt=dd #EPs=dd Cls=xx(sssss) Sub=xx Prot=xx Driver=xxxx*/ 105/* I: If#=dd Alt=dd #EPs=dd Cls=xx(sssss) Sub=xx Prot=xx Driver=xxxx*/
106 "I: If#=%2d Alt=%2d #EPs=%2d Cls=%02x(%-5s) Sub=%02x Prot=%02x Driver=%s\n"; 106 "I: If#=%2d Alt=%2d #EPs=%2d Cls=%02x(%-5s) Sub=%02x Prot=%02x Driver=%s\n";
107 107
108static char *format_endpt = 108static const char *format_endpt =
109/* E: Ad=xx(s) Atr=xx(ssss) MxPS=dddd Ivl=D?s */ 109/* E: Ad=xx(s) Atr=xx(ssss) MxPS=dddd Ivl=D?s */
110 "E: Ad=%02x(%c) Atr=%02x(%-4s) MxPS=%4d Ivl=%d%cs\n"; 110 "E: Ad=%02x(%c) Atr=%02x(%-4s) MxPS=%4d Ivl=%d%cs\n";
111 111
@@ -545,10 +545,10 @@ static ssize_t usb_device_dump(char __user **buffer, size_t *nbytes, loff_t *ski
545 struct usb_device *childdev = usbdev->children[chix]; 545 struct usb_device *childdev = usbdev->children[chix];
546 546
547 if (childdev) { 547 if (childdev) {
548 down(&childdev->serialize); 548 usb_lock_device(childdev);
549 ret = usb_device_dump(buffer, nbytes, skip_bytes, file_offset, childdev, 549 ret = usb_device_dump(buffer, nbytes, skip_bytes, file_offset, childdev,
550 bus, level + 1, chix, ++cnt); 550 bus, level + 1, chix, ++cnt);
551 up(&childdev->serialize); 551 usb_unlock_device(childdev);
552 if (ret == -EFAULT) 552 if (ret == -EFAULT)
553 return total_written; 553 return total_written;
554 total_written += ret; 554 total_written += ret;