diff options
Diffstat (limited to 'drivers/usb/core/devices.c')
-rw-r--r-- | drivers/usb/core/devices.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c index 3538c2fdadfe..ea398e5d50af 100644 --- a/drivers/usb/core/devices.c +++ b/drivers/usb/core/devices.c | |||
@@ -175,12 +175,13 @@ static char *usb_dump_endpoint_descriptor ( | |||
175 | ) | 175 | ) |
176 | { | 176 | { |
177 | char dir, unit, *type; | 177 | char dir, unit, *type; |
178 | unsigned interval, in, bandwidth = 1; | 178 | unsigned interval, bandwidth = 1; |
179 | 179 | ||
180 | if (start > end) | 180 | if (start > end) |
181 | return start; | 181 | return start; |
182 | in = (desc->bEndpointAddress & USB_DIR_IN); | 182 | |
183 | dir = in ? 'I' : 'O'; | 183 | dir = usb_endpoint_dir_in(desc) ? 'I' : 'O'; |
184 | |||
184 | if (speed == USB_SPEED_HIGH) { | 185 | if (speed == USB_SPEED_HIGH) { |
185 | switch (le16_to_cpu(desc->wMaxPacketSize) & (0x03 << 11)) { | 186 | switch (le16_to_cpu(desc->wMaxPacketSize) & (0x03 << 11)) { |
186 | case 1 << 11: bandwidth = 2; break; | 187 | case 1 << 11: bandwidth = 2; break; |
@@ -204,7 +205,7 @@ static char *usb_dump_endpoint_descriptor ( | |||
204 | break; | 205 | break; |
205 | case USB_ENDPOINT_XFER_BULK: | 206 | case USB_ENDPOINT_XFER_BULK: |
206 | type = "Bulk"; | 207 | type = "Bulk"; |
207 | if (speed == USB_SPEED_HIGH && !in) /* uframes per NAK */ | 208 | if (speed == USB_SPEED_HIGH && dir == 'O') /* uframes per NAK */ |
208 | interval = desc->bInterval; | 209 | interval = desc->bInterval; |
209 | else | 210 | else |
210 | interval = 0; | 211 | interval = 0; |