USB Consolidate descriptor definitions
[oweals/u-boot.git] / drivers / usb / host / ehci-hcd.c
index bbd547b3e357fb8011702d34d9a26c9b546e5a27..ba85991e864ad940adc28a080f9068a1130ae485 100644 (file)
@@ -96,7 +96,7 @@ static struct descriptor {
                                 * UE_DIR_IN | EHCI_INTR_ENDPT
                                 */
                3,              /* bmAttributes: UE_INTERRUPT */
-               8, 0,           /* wMaxPacketSize */
+               8,              /* wMaxPacketSize */
                255             /* bInterval */
        },
 };
@@ -550,9 +550,9 @@ ehci_submit_root(struct usb_device *dev, unsigned long pipe, void *buffer,
              req->requesttype, req->requesttype,
              le16_to_cpu(req->value), le16_to_cpu(req->index));
 
-       typeReq = req->request << 8 | req->requesttype;
+       typeReq = req->request | req->requesttype << 8;
 
-       switch (le16_to_cpu(typeReq)) {
+       switch (typeReq) {
        case DeviceRequest | USB_REQ_GET_DESCRIPTOR:
                switch (le16_to_cpu(req->value) >> 8) {
                case USB_DT_DEVICE:
@@ -716,7 +716,7 @@ ehci_submit_root(struct usb_device *dev, unsigned long pipe, void *buffer,
                        goto unknown;
                }
                /* unblock posted writes */
-               ehci_readl(&hcor->or_usbcmd);
+               (void) ehci_readl(&hcor->or_usbcmd);
                break;
        case USB_REQ_CLEAR_FEATURE | ((USB_DIR_OUT | USB_RT_PORT) << 8):
                reg = ehci_readl(status_reg);
@@ -745,7 +745,7 @@ ehci_submit_root(struct usb_device *dev, unsigned long pipe, void *buffer,
                }
                ehci_writel(status_reg, reg);
                /* unblock posted write */
-               ehci_readl(&hcor->or_usbcmd);
+               (void) ehci_readl(&hcor->or_usbcmd);
                break;
        default:
                debug("Unknown request\n");