xhci-mem.c: xhci_segment_free: No need for checking seg argument
[pandora-kernel.git] / drivers / usb / host / uhci-q.c
index 84ed28b..f6ca80e 100644 (file)
@@ -280,7 +280,7 @@ static struct uhci_qh *uhci_alloc_qh(struct uhci_hcd *uhci,
                        qh->load = usb_calc_bus_time(udev->speed,
                                        usb_endpoint_dir_in(&hep->desc),
                                        qh->type == USB_ENDPOINT_XFER_ISOC,
-                                       le16_to_cpu(hep->desc.wMaxPacketSize))
+                                       usb_endpoint_maxp(&hep->desc))
                                / 1000 + 1;
 
        } else {                /* Skeleton QH */
@@ -792,7 +792,7 @@ static int uhci_submit_control(struct uhci_hcd *uhci, struct urb *urb,
 {
        struct uhci_td *td;
        unsigned long destination, status;
-       int maxsze = le16_to_cpu(qh->hep->desc.wMaxPacketSize);
+       int maxsze = usb_endpoint_maxp(&qh->hep->desc);
        int len = urb->transfer_buffer_length;
        dma_addr_t data = urb->transfer_dma;
        __hc32 *plink;
@@ -918,7 +918,7 @@ static int uhci_submit_common(struct uhci_hcd *uhci, struct urb *urb,
 {
        struct uhci_td *td;
        unsigned long destination, status;
-       int maxsze = le16_to_cpu(qh->hep->desc.wMaxPacketSize);
+       int maxsze = usb_endpoint_maxp(&qh->hep->desc);
        int len = urb->transfer_buffer_length;
        int this_sg_len;
        dma_addr_t data;