]> err.no Git - linux-2.6/commitdiff
USB: devices: Use usb_endpoint_* functions
authorLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Thu, 26 Oct 2006 16:02:49 +0000 (13:02 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Dec 2006 22:23:28 +0000 (14:23 -0800)
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/devices.c

index 3538c2fdadfe5752fc650cc858fd2ab76de32ff5..ea398e5d50af5c6bd90621d06946ad6617af0bdb 100644 (file)
@@ -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;