| .. | .. |
|---|
| 629 | 629 | static void fotg210_set_address(struct fotg210_udc *fotg210, |
|---|
| 630 | 630 | struct usb_ctrlrequest *ctrl) |
|---|
| 631 | 631 | { |
|---|
| 632 | | - if (ctrl->wValue >= 0x0100) { |
|---|
| 632 | + if (le16_to_cpu(ctrl->wValue) >= 0x0100) { |
|---|
| 633 | 633 | fotg210_request_error(fotg210); |
|---|
| 634 | 634 | } else { |
|---|
| 635 | | - fotg210_set_dev_addr(fotg210, ctrl->wValue); |
|---|
| 635 | + fotg210_set_dev_addr(fotg210, le16_to_cpu(ctrl->wValue)); |
|---|
| 636 | 636 | fotg210_set_cxdone(fotg210); |
|---|
| 637 | 637 | } |
|---|
| 638 | 638 | } |
|---|
| .. | .. |
|---|
| 713 | 713 | |
|---|
| 714 | 714 | switch (ctrl->bRequestType & USB_RECIP_MASK) { |
|---|
| 715 | 715 | case USB_RECIP_DEVICE: |
|---|
| 716 | | - fotg210->ep0_data = 1 << USB_DEVICE_SELF_POWERED; |
|---|
| 716 | + fotg210->ep0_data = cpu_to_le16(1 << USB_DEVICE_SELF_POWERED); |
|---|
| 717 | 717 | break; |
|---|
| 718 | 718 | case USB_RECIP_INTERFACE: |
|---|
| 719 | | - fotg210->ep0_data = 0; |
|---|
| 719 | + fotg210->ep0_data = cpu_to_le16(0); |
|---|
| 720 | 720 | break; |
|---|
| 721 | 721 | case USB_RECIP_ENDPOINT: |
|---|
| 722 | 722 | epnum = ctrl->wIndex & USB_ENDPOINT_NUMBER_MASK; |
|---|
| 723 | 723 | if (epnum) |
|---|
| 724 | 724 | fotg210->ep0_data = |
|---|
| 725 | | - fotg210_is_epnstall(fotg210->ep[epnum]) |
|---|
| 726 | | - << USB_ENDPOINT_HALT; |
|---|
| 725 | + cpu_to_le16(fotg210_is_epnstall(fotg210->ep[epnum]) |
|---|
| 726 | + << USB_ENDPOINT_HALT); |
|---|
| 727 | 727 | else |
|---|
| 728 | 728 | fotg210_request_error(fotg210); |
|---|
| 729 | 729 | break; |
|---|