USB: use usb_endpoint_maxp() instead of le16_to_cpu()
[deliverable/linux.git] / drivers / usb / host / uhci-q.c
index 84ed28b34f934d86ecef647d73580309baf3f2b8..f6ca80ee4cec0ddbe9d44159bb1862b3a9c19843 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;
This page took 0.030726 seconds and 5 git commands to generate.