From lcapitulino@mandriva.com.br Thu Oct 26 09:03:49 2006 Message-Id: <20061026160318.595735862@mandriva.com.br> Date: Thu, 26 Oct 2006 13:02:49 -0300 From: Luiz Fernando N. Capitulino To: greg@kroah.com Cc: linux-usb-devel@lists.sourceforge.net Subject: USB: devices: Use usb_endpoint_* functions Content-Disposition: inline; filename=devices-use-usb-endpoint-functions.patch Signed-off-by: Luiz Fernando N. Capitulino Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/devices.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) --- gregkh-2.6.orig/drivers/usb/core/devices.c +++ gregkh-2.6/drivers/usb/core/devices.c @@ -175,12 +175,13 @@ static char *usb_dump_endpoint_descripto ) { 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_descripto 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;