Commit 87ad46c9 authored by Luiz Fernando N. Capitulino's avatar Luiz Fernando N. Capitulino Committed by Greg Kroah-Hartman

USB: devices: Use usb_endpoint_* functions

Signed-off-by: default avatarLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 45aea704
......@@ -175,12 +175,13 @@ static char *usb_dump_endpoint_descriptor (
)
{
char dir, unit, *type;
unsigned interval, in, bandwidth = 1;
unsigned interval, bandwidth = 1;
if (start > end)
return start;
in = (desc->bEndpointAddress & USB_DIR_IN);
dir = in ? 'I' : 'O';
dir = usb_endpoint_dir_in(desc) ? 'I' : 'O';
if (speed == USB_SPEED_HIGH) {
switch (le16_to_cpu(desc->wMaxPacketSize) & (0x03 << 11)) {
case 1 << 11: bandwidth = 2; break;
......@@ -204,7 +205,7 @@ static char *usb_dump_endpoint_descriptor (
break;
case USB_ENDPOINT_XFER_BULK:
type = "Bulk";
if (speed == USB_SPEED_HIGH && !in) /* uframes per NAK */
if (speed == USB_SPEED_HIGH && dir == 'O') /* uframes per NAK */
interval = desc->bInterval;
else
interval = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment