aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2009-02-11 17:11:36 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-03-24 19:20:33 -0400
commit551509d267905705f6d723e51ec706916f06b859 (patch)
tree9dde914015af234cd4c399585037d8dca7d42e78 /drivers/usb
parenta78b42824dd7c2b40d72fb01f1b1842f7e845f3a (diff)
USB: replace uses of __constant_{endian}
The base versions handle constant folding now. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/core/hcd.c2
-rw-r--r--drivers/usb/core/hub.c8
-rw-r--r--drivers/usb/gadget/amd5536udc.c2
-rw-r--r--drivers/usb/gadget/atmel_usba_udc.c20
-rw-r--r--drivers/usb/gadget/cdc2.c8
-rw-r--r--drivers/usb/gadget/dummy_hcd.c2
-rw-r--r--drivers/usb/gadget/epautoconf.c2
-rw-r--r--drivers/usb/gadget/ether.c8
-rw-r--r--drivers/usb/gadget/f_acm.c10
-rw-r--r--drivers/usb/gadget/f_ecm.c16
-rw-r--r--drivers/usb/gadget/f_loopback.c4
-rw-r--r--drivers/usb/gadget/f_obex.c8
-rw-r--r--drivers/usb/gadget/f_phonet.c8
-rw-r--r--drivers/usb/gadget/f_rndis.c10
-rw-r--r--drivers/usb/gadget/f_serial.c4
-rw-r--r--drivers/usb/gadget/f_sourcesink.c4
-rw-r--r--drivers/usb/gadget/f_subset.c14
-rw-r--r--drivers/usb/gadget/file_storage.c22
-rw-r--r--drivers/usb/gadget/gmidi.c16
-rw-r--r--drivers/usb/gadget/goku_udc.c8
-rw-r--r--drivers/usb/gadget/inode.c4
-rw-r--r--drivers/usb/gadget/net2280.c16
-rw-r--r--drivers/usb/gadget/printer.c18
-rw-r--r--drivers/usb/gadget/serial.c12
-rw-r--r--drivers/usb/gadget/u_serial.c2
-rw-r--r--drivers/usb/gadget/zero.c8
-rw-r--r--drivers/usb/host/ehci-sched.c2
-rw-r--r--drivers/usb/host/ehci.h2
-rw-r--r--drivers/usb/host/isp1760-hcd.c4
-rw-r--r--drivers/usb/host/oxu210hp-hcd.c22
-rw-r--r--drivers/usb/host/oxu210hp.h8
-rw-r--r--drivers/usb/host/uhci-hcd.h10
-rw-r--r--drivers/usb/host/uhci-q.c10
-rw-r--r--drivers/usb/image/mdc800.c8
-rw-r--r--drivers/usb/musb/musb_virthub.c2
35 files changed, 152 insertions, 152 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 3c711db55d86..0eee32a65e23 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -901,7 +901,7 @@ static int register_root_hub(struct usb_hcd *hcd)
901 901
902 mutex_lock(&usb_bus_list_lock); 902 mutex_lock(&usb_bus_list_lock);
903 903
904 usb_dev->ep0.desc.wMaxPacketSize = __constant_cpu_to_le16(64); 904 usb_dev->ep0.desc.wMaxPacketSize = cpu_to_le16(64);
905 retval = usb_get_device_descriptor(usb_dev, USB_DT_DEVICE_SIZE); 905 retval = usb_get_device_descriptor(usb_dev, USB_DT_DEVICE_SIZE);
906 if (retval != sizeof usb_dev->descriptor) { 906 if (retval != sizeof usb_dev->descriptor) {
907 mutex_unlock(&usb_bus_list_lock); 907 mutex_unlock(&usb_bus_list_lock);
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index cd50d86029e7..7e33d63ab92f 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2471,20 +2471,20 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
2471 */ 2471 */
2472 switch (udev->speed) { 2472 switch (udev->speed) {
2473 case USB_SPEED_VARIABLE: /* fixed at 512 */ 2473 case USB_SPEED_VARIABLE: /* fixed at 512 */
2474 udev->ep0.desc.wMaxPacketSize = __constant_cpu_to_le16(512); 2474 udev->ep0.desc.wMaxPacketSize = cpu_to_le16(512);
2475 break; 2475 break;
2476 case USB_SPEED_HIGH: /* fixed at 64 */ 2476 case USB_SPEED_HIGH: /* fixed at 64 */
2477 udev->ep0.desc.wMaxPacketSize = __constant_cpu_to_le16(64); 2477 udev->ep0.desc.wMaxPacketSize = cpu_to_le16(64);
2478 break; 2478 break;
2479 case USB_SPEED_FULL: /* 8, 16, 32, or 64 */ 2479 case USB_SPEED_FULL: /* 8, 16, 32, or 64 */
2480 /* to determine the ep0 maxpacket size, try to read 2480 /* to determine the ep0 maxpacket size, try to read
2481 * the device descriptor to get bMaxPacketSize0 and 2481 * the device descriptor to get bMaxPacketSize0 and
2482 * then correct our initial guess. 2482 * then correct our initial guess.
2483 */ 2483 */
2484 udev->ep0.desc.wMaxPacketSize = __constant_cpu_to_le16(64); 2484 udev->ep0.desc.wMaxPacketSize = cpu_to_le16(64);
2485 break; 2485 break;
2486 case USB_SPEED_LOW: /* fixed at 8 */ 2486 case USB_SPEED_LOW: /* fixed at 8 */
2487 udev->ep0.desc.wMaxPacketSize = __constant_cpu_to_le16(8); 2487 udev->ep0.desc.wMaxPacketSize = cpu_to_le16(8);
2488 break; 2488 break;
2489 default: 2489 default:
2490 goto fail; 2490 goto fail;
diff --git a/drivers/usb/gadget/amd5536udc.c b/drivers/usb/gadget/amd5536udc.c
index abf8192f89e8..826f3adde5d8 100644
--- a/drivers/usb/gadget/amd5536udc.c
+++ b/drivers/usb/gadget/amd5536udc.c
@@ -551,7 +551,7 @@ udc_alloc_request(struct usb_ep *usbep, gfp_t gfp)
551 dma_desc->status = AMD_ADDBITS(dma_desc->status, 551 dma_desc->status = AMD_ADDBITS(dma_desc->status,
552 UDC_DMA_STP_STS_BS_HOST_BUSY, 552 UDC_DMA_STP_STS_BS_HOST_BUSY,
553 UDC_DMA_STP_STS_BS); 553 UDC_DMA_STP_STS_BS);
554 dma_desc->bufptr = __constant_cpu_to_le32(DMA_DONT_USE); 554 dma_desc->bufptr = cpu_to_le32(DMA_DONT_USE);
555 req->td_data = dma_desc; 555 req->td_data = dma_desc;
556 req->td_data_last = NULL; 556 req->td_data_last = NULL;
557 req->chain_len = 1; 557 req->chain_len = 1;
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
index 65b03e3445a1..c22fab164113 100644
--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -1017,7 +1017,7 @@ static struct usb_endpoint_descriptor usba_ep0_desc = {
1017 .bDescriptorType = USB_DT_ENDPOINT, 1017 .bDescriptorType = USB_DT_ENDPOINT,
1018 .bEndpointAddress = 0, 1018 .bEndpointAddress = 0,
1019 .bmAttributes = USB_ENDPOINT_XFER_CONTROL, 1019 .bmAttributes = USB_ENDPOINT_XFER_CONTROL,
1020 .wMaxPacketSize = __constant_cpu_to_le16(64), 1020 .wMaxPacketSize = cpu_to_le16(64),
1021 /* FIXME: I have no idea what to put here */ 1021 /* FIXME: I have no idea what to put here */
1022 .bInterval = 1, 1022 .bInterval = 1,
1023}; 1023};
@@ -1207,21 +1207,21 @@ static int do_test_mode(struct usba_udc *udc)
1207/* Avoid overly long expressions */ 1207/* Avoid overly long expressions */
1208static inline bool feature_is_dev_remote_wakeup(struct usb_ctrlrequest *crq) 1208static inline bool feature_is_dev_remote_wakeup(struct usb_ctrlrequest *crq)
1209{ 1209{
1210 if (crq->wValue == __constant_cpu_to_le16(USB_DEVICE_REMOTE_WAKEUP)) 1210 if (crq->wValue == cpu_to_le16(USB_DEVICE_REMOTE_WAKEUP))
1211 return true; 1211 return true;
1212 return false; 1212 return false;
1213} 1213}
1214 1214
1215static inline bool feature_is_dev_test_mode(struct usb_ctrlrequest *crq) 1215static inline bool feature_is_dev_test_mode(struct usb_ctrlrequest *crq)
1216{ 1216{
1217 if (crq->wValue == __constant_cpu_to_le16(USB_DEVICE_TEST_MODE)) 1217 if (crq->wValue == cpu_to_le16(USB_DEVICE_TEST_MODE))
1218 return true; 1218 return true;
1219 return false; 1219 return false;
1220} 1220}
1221 1221
1222static inline bool feature_is_ep_halt(struct usb_ctrlrequest *crq) 1222static inline bool feature_is_ep_halt(struct usb_ctrlrequest *crq)
1223{ 1223{
1224 if (crq->wValue == __constant_cpu_to_le16(USB_ENDPOINT_HALT)) 1224 if (crq->wValue == cpu_to_le16(USB_ENDPOINT_HALT))
1225 return true; 1225 return true;
1226 return false; 1226 return false;
1227} 1227}
@@ -1239,7 +1239,7 @@ static int handle_ep0_setup(struct usba_udc *udc, struct usba_ep *ep,
1239 status = cpu_to_le16(udc->devstatus); 1239 status = cpu_to_le16(udc->devstatus);
1240 } else if (crq->bRequestType 1240 } else if (crq->bRequestType
1241 == (USB_DIR_IN | USB_RECIP_INTERFACE)) { 1241 == (USB_DIR_IN | USB_RECIP_INTERFACE)) {
1242 status = __constant_cpu_to_le16(0); 1242 status = cpu_to_le16(0);
1243 } else if (crq->bRequestType 1243 } else if (crq->bRequestType
1244 == (USB_DIR_IN | USB_RECIP_ENDPOINT)) { 1244 == (USB_DIR_IN | USB_RECIP_ENDPOINT)) {
1245 struct usba_ep *target; 1245 struct usba_ep *target;
@@ -1250,12 +1250,12 @@ static int handle_ep0_setup(struct usba_udc *udc, struct usba_ep *ep,
1250 1250
1251 status = 0; 1251 status = 0;
1252 if (is_stalled(udc, target)) 1252 if (is_stalled(udc, target))
1253 status |= __constant_cpu_to_le16(1); 1253 status |= cpu_to_le16(1);
1254 } else 1254 } else
1255 goto delegate; 1255 goto delegate;
1256 1256
1257 /* Write directly to the FIFO. No queueing is done. */ 1257 /* Write directly to the FIFO. No queueing is done. */
1258 if (crq->wLength != __constant_cpu_to_le16(sizeof(status))) 1258 if (crq->wLength != cpu_to_le16(sizeof(status)))
1259 goto stall; 1259 goto stall;
1260 ep->state = DATA_STAGE_IN; 1260 ep->state = DATA_STAGE_IN;
1261 __raw_writew(status, ep->fifo); 1261 __raw_writew(status, ep->fifo);
@@ -1274,7 +1274,7 @@ static int handle_ep0_setup(struct usba_udc *udc, struct usba_ep *ep,
1274 } else if (crq->bRequestType == USB_RECIP_ENDPOINT) { 1274 } else if (crq->bRequestType == USB_RECIP_ENDPOINT) {
1275 struct usba_ep *target; 1275 struct usba_ep *target;
1276 1276
1277 if (crq->wLength != __constant_cpu_to_le16(0) 1277 if (crq->wLength != cpu_to_le16(0)
1278 || !feature_is_ep_halt(crq)) 1278 || !feature_is_ep_halt(crq))
1279 goto stall; 1279 goto stall;
1280 target = get_ep_by_addr(udc, le16_to_cpu(crq->wIndex)); 1280 target = get_ep_by_addr(udc, le16_to_cpu(crq->wIndex));
@@ -1308,7 +1308,7 @@ static int handle_ep0_setup(struct usba_udc *udc, struct usba_ep *ep,
1308 } else if (crq->bRequestType == USB_RECIP_ENDPOINT) { 1308 } else if (crq->bRequestType == USB_RECIP_ENDPOINT) {
1309 struct usba_ep *target; 1309 struct usba_ep *target;
1310 1310
1311 if (crq->wLength != __constant_cpu_to_le16(0) 1311 if (crq->wLength != cpu_to_le16(0)
1312 || !feature_is_ep_halt(crq)) 1312 || !feature_is_ep_halt(crq))
1313 goto stall; 1313 goto stall;
1314 1314
@@ -1514,7 +1514,7 @@ restart:
1514 */ 1514 */
1515 ep->state = DATA_STAGE_IN; 1515 ep->state = DATA_STAGE_IN;
1516 } else { 1516 } else {
1517 if (crq.crq.wLength != __constant_cpu_to_le16(0)) 1517 if (crq.crq.wLength != cpu_to_le16(0))
1518 ep->state = DATA_STAGE_OUT; 1518 ep->state = DATA_STAGE_OUT;
1519 else 1519 else
1520 ep->state = STATUS_STAGE_IN; 1520 ep->state = STATUS_STAGE_IN;
diff --git a/drivers/usb/gadget/cdc2.c b/drivers/usb/gadget/cdc2.c
index 5495b171cf29..928137d3dbdc 100644
--- a/drivers/usb/gadget/cdc2.c
+++ b/drivers/usb/gadget/cdc2.c
@@ -66,7 +66,7 @@ static struct usb_device_descriptor device_desc = {
66 .bLength = sizeof device_desc, 66 .bLength = sizeof device_desc,
67 .bDescriptorType = USB_DT_DEVICE, 67 .bDescriptorType = USB_DT_DEVICE,
68 68
69 .bcdUSB = __constant_cpu_to_le16(0x0200), 69 .bcdUSB = cpu_to_le16(0x0200),
70 70
71 .bDeviceClass = USB_CLASS_COMM, 71 .bDeviceClass = USB_CLASS_COMM,
72 .bDeviceSubClass = 0, 72 .bDeviceSubClass = 0,
@@ -74,8 +74,8 @@ static struct usb_device_descriptor device_desc = {
74 /* .bMaxPacketSize0 = f(hardware) */ 74 /* .bMaxPacketSize0 = f(hardware) */
75 75
76 /* Vendor and product id can be overridden by module parameters. */ 76 /* Vendor and product id can be overridden by module parameters. */
77 .idVendor = __constant_cpu_to_le16(CDC_VENDOR_NUM), 77 .idVendor = cpu_to_le16(CDC_VENDOR_NUM),
78 .idProduct = __constant_cpu_to_le16(CDC_PRODUCT_NUM), 78 .idProduct = cpu_to_le16(CDC_PRODUCT_NUM),
79 /* .bcdDevice = f(hardware) */ 79 /* .bcdDevice = f(hardware) */
80 /* .iManufacturer = DYNAMIC */ 80 /* .iManufacturer = DYNAMIC */
81 /* .iProduct = DYNAMIC */ 81 /* .iProduct = DYNAMIC */
@@ -193,7 +193,7 @@ static int __init cdc_bind(struct usb_composite_dev *cdev)
193 gadget->name, 193 gadget->name,
194 cdc_config_driver.label); 194 cdc_config_driver.label);
195 device_desc.bcdDevice = 195 device_desc.bcdDevice =
196 __constant_cpu_to_le16(0x0300 | 0x0099); 196 cpu_to_le16(0x0300 | 0x0099);
197 } 197 }
198 198
199 199
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index 9064696636ac..3b42888b72f8 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -1626,7 +1626,7 @@ static int dummy_hub_control (
1626 hub_descriptor ((struct usb_hub_descriptor *) buf); 1626 hub_descriptor ((struct usb_hub_descriptor *) buf);
1627 break; 1627 break;
1628 case GetHubStatus: 1628 case GetHubStatus:
1629 *(__le32 *) buf = __constant_cpu_to_le32 (0); 1629 *(__le32 *) buf = cpu_to_le32 (0);
1630 break; 1630 break;
1631 case GetPortStatus: 1631 case GetPortStatus:
1632 if (wIndex != 1) 1632 if (wIndex != 1)
diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c
index a36b1175b18d..cd0914ec898e 100644
--- a/drivers/usb/gadget/epautoconf.c
+++ b/drivers/usb/gadget/epautoconf.c
@@ -148,7 +148,7 @@ ep_matches (
148 return 0; 148 return 0;
149 149
150 /* BOTH: "high bandwidth" works only at high speed */ 150 /* BOTH: "high bandwidth" works only at high speed */
151 if ((desc->wMaxPacketSize & __constant_cpu_to_le16(3<<11))) { 151 if ((desc->wMaxPacketSize & cpu_to_le16(3<<11))) {
152 if (!gadget->is_dualspeed) 152 if (!gadget->is_dualspeed)
153 return 0; 153 return 0;
154 /* configure your hardware with enough buffering!! */ 154 /* configure your hardware with enough buffering!! */
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 37252d0012a7..d006dc652e02 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -156,7 +156,7 @@ static struct usb_device_descriptor device_desc = {
156 .bLength = sizeof device_desc, 156 .bLength = sizeof device_desc,
157 .bDescriptorType = USB_DT_DEVICE, 157 .bDescriptorType = USB_DT_DEVICE,
158 158
159 .bcdUSB = __constant_cpu_to_le16 (0x0200), 159 .bcdUSB = cpu_to_le16 (0x0200),
160 160
161 .bDeviceClass = USB_CLASS_COMM, 161 .bDeviceClass = USB_CLASS_COMM,
162 .bDeviceSubClass = 0, 162 .bDeviceSubClass = 0,
@@ -167,8 +167,8 @@ static struct usb_device_descriptor device_desc = {
167 * we support. (As does bNumConfigurations.) These values can 167 * we support. (As does bNumConfigurations.) These values can
168 * also be overridden by module parameters. 168 * also be overridden by module parameters.
169 */ 169 */
170 .idVendor = __constant_cpu_to_le16 (CDC_VENDOR_NUM), 170 .idVendor = cpu_to_le16 (CDC_VENDOR_NUM),
171 .idProduct = __constant_cpu_to_le16 (CDC_PRODUCT_NUM), 171 .idProduct = cpu_to_le16 (CDC_PRODUCT_NUM),
172 /* .bcdDevice = f(hardware) */ 172 /* .bcdDevice = f(hardware) */
173 /* .iManufacturer = DYNAMIC */ 173 /* .iManufacturer = DYNAMIC */
174 /* .iProduct = DYNAMIC */ 174 /* .iProduct = DYNAMIC */
@@ -318,7 +318,7 @@ static int __init eth_bind(struct usb_composite_dev *cdev)
318 gadget->name, 318 gadget->name,
319 eth_config_driver.label); 319 eth_config_driver.label);
320 device_desc.bcdDevice = 320 device_desc.bcdDevice =
321 __constant_cpu_to_le16(0x0300 | 0x0099); 321 cpu_to_le16(0x0300 | 0x0099);
322 } 322 }
323 323
324 324
diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c
index c1d34df0b157..7953948bfe4a 100644
--- a/drivers/usb/gadget/f_acm.c
+++ b/drivers/usb/gadget/f_acm.c
@@ -125,7 +125,7 @@ static struct usb_cdc_header_desc acm_header_desc __initdata = {
125 .bLength = sizeof(acm_header_desc), 125 .bLength = sizeof(acm_header_desc),
126 .bDescriptorType = USB_DT_CS_INTERFACE, 126 .bDescriptorType = USB_DT_CS_INTERFACE,
127 .bDescriptorSubType = USB_CDC_HEADER_TYPE, 127 .bDescriptorSubType = USB_CDC_HEADER_TYPE,
128 .bcdCDC = __constant_cpu_to_le16(0x0110), 128 .bcdCDC = cpu_to_le16(0x0110),
129}; 129};
130 130
131static struct usb_cdc_call_mgmt_descriptor 131static struct usb_cdc_call_mgmt_descriptor
@@ -159,7 +159,7 @@ static struct usb_endpoint_descriptor acm_fs_notify_desc __initdata = {
159 .bDescriptorType = USB_DT_ENDPOINT, 159 .bDescriptorType = USB_DT_ENDPOINT,
160 .bEndpointAddress = USB_DIR_IN, 160 .bEndpointAddress = USB_DIR_IN,
161 .bmAttributes = USB_ENDPOINT_XFER_INT, 161 .bmAttributes = USB_ENDPOINT_XFER_INT,
162 .wMaxPacketSize = __constant_cpu_to_le16(GS_NOTIFY_MAXPACKET), 162 .wMaxPacketSize = cpu_to_le16(GS_NOTIFY_MAXPACKET),
163 .bInterval = 1 << GS_LOG2_NOTIFY_INTERVAL, 163 .bInterval = 1 << GS_LOG2_NOTIFY_INTERVAL,
164}; 164};
165 165
@@ -197,7 +197,7 @@ static struct usb_endpoint_descriptor acm_hs_notify_desc __initdata = {
197 .bDescriptorType = USB_DT_ENDPOINT, 197 .bDescriptorType = USB_DT_ENDPOINT,
198 .bEndpointAddress = USB_DIR_IN, 198 .bEndpointAddress = USB_DIR_IN,
199 .bmAttributes = USB_ENDPOINT_XFER_INT, 199 .bmAttributes = USB_ENDPOINT_XFER_INT,
200 .wMaxPacketSize = __constant_cpu_to_le16(GS_NOTIFY_MAXPACKET), 200 .wMaxPacketSize = cpu_to_le16(GS_NOTIFY_MAXPACKET),
201 .bInterval = GS_LOG2_NOTIFY_INTERVAL+4, 201 .bInterval = GS_LOG2_NOTIFY_INTERVAL+4,
202}; 202};
203 203
@@ -205,14 +205,14 @@ static struct usb_endpoint_descriptor acm_hs_in_desc __initdata = {
205 .bLength = USB_DT_ENDPOINT_SIZE, 205 .bLength = USB_DT_ENDPOINT_SIZE,
206 .bDescriptorType = USB_DT_ENDPOINT, 206 .bDescriptorType = USB_DT_ENDPOINT,
207 .bmAttributes = USB_ENDPOINT_XFER_BULK, 207 .bmAttributes = USB_ENDPOINT_XFER_BULK,
208 .wMaxPacketSize = __constant_cpu_to_le16(512), 208 .wMaxPacketSize = cpu_to_le16(512),
209}; 209};
210 210
211static struct usb_endpoint_descriptor acm_hs_out_desc __initdata = { 211static struct usb_endpoint_descriptor acm_hs_out_desc __initdata = {
212 .bLength = USB_DT_ENDPOINT_SIZE, 212 .bLength = USB_DT_ENDPOINT_SIZE,
213 .bDescriptorType = USB_DT_ENDPOINT, 213 .bDescriptorType = USB_DT_ENDPOINT,
214 .bmAttributes = USB_ENDPOINT_XFER_BULK, 214 .bmAttributes = USB_ENDPOINT_XFER_BULK,
215 .wMaxPacketSize = __constant_cpu_to_le16(512), 215 .wMaxPacketSize = cpu_to_le16(512),
216}; 216};
217 217
218static struct usb_descriptor_header *acm_hs_function[] __initdata = { 218static struct usb_descriptor_header *acm_hs_function[] __initdata = {
diff --git a/drivers/usb/gadget/f_ecm.c b/drivers/usb/gadget/f_ecm.c
index 4ae579948e54..ecf5bdd0ae06 100644
--- a/drivers/usb/gadget/f_ecm.c
+++ b/drivers/usb/gadget/f_ecm.c
@@ -130,7 +130,7 @@ static struct usb_cdc_header_desc ecm_header_desc __initdata = {
130 .bDescriptorType = USB_DT_CS_INTERFACE, 130 .bDescriptorType = USB_DT_CS_INTERFACE,
131 .bDescriptorSubType = USB_CDC_HEADER_TYPE, 131 .bDescriptorSubType = USB_CDC_HEADER_TYPE,
132 132
133 .bcdCDC = __constant_cpu_to_le16(0x0110), 133 .bcdCDC = cpu_to_le16(0x0110),
134}; 134};
135 135
136static struct usb_cdc_union_desc ecm_union_desc __initdata = { 136static struct usb_cdc_union_desc ecm_union_desc __initdata = {
@@ -148,9 +148,9 @@ static struct usb_cdc_ether_desc ecm_desc __initdata = {
148 148
149 /* this descriptor actually adds value, surprise! */ 149 /* this descriptor actually adds value, surprise! */
150 /* .iMACAddress = DYNAMIC */ 150 /* .iMACAddress = DYNAMIC */
151 .bmEthernetStatistics = __constant_cpu_to_le32(0), /* no statistics */ 151 .bmEthernetStatistics = cpu_to_le32(0), /* no statistics */
152 .wMaxSegmentSize = __constant_cpu_to_le16(ETH_FRAME_LEN), 152 .wMaxSegmentSize = cpu_to_le16(ETH_FRAME_LEN),
153 .wNumberMCFilters = __constant_cpu_to_le16(0), 153 .wNumberMCFilters = cpu_to_le16(0),
154 .bNumberPowerFilters = 0, 154 .bNumberPowerFilters = 0,
155}; 155};
156 156
@@ -192,7 +192,7 @@ static struct usb_endpoint_descriptor fs_ecm_notify_desc __initdata = {
192 192
193 .bEndpointAddress = USB_DIR_IN, 193 .bEndpointAddress = USB_DIR_IN,
194 .bmAttributes = USB_ENDPOINT_XFER_INT, 194 .bmAttributes = USB_ENDPOINT_XFER_INT,
195 .wMaxPacketSize = __constant_cpu_to_le16(ECM_STATUS_BYTECOUNT), 195 .wMaxPacketSize = cpu_to_le16(ECM_STATUS_BYTECOUNT),
196 .bInterval = 1 << LOG2_STATUS_INTERVAL_MSEC, 196 .bInterval = 1 << LOG2_STATUS_INTERVAL_MSEC,
197}; 197};
198 198
@@ -236,7 +236,7 @@ static struct usb_endpoint_descriptor hs_ecm_notify_desc __initdata = {
236 236
237 .bEndpointAddress = USB_DIR_IN, 237 .bEndpointAddress = USB_DIR_IN,
238 .bmAttributes = USB_ENDPOINT_XFER_INT, 238 .bmAttributes = USB_ENDPOINT_XFER_INT,
239 .wMaxPacketSize = __constant_cpu_to_le16(ECM_STATUS_BYTECOUNT), 239 .wMaxPacketSize = cpu_to_le16(ECM_STATUS_BYTECOUNT),
240 .bInterval = LOG2_STATUS_INTERVAL_MSEC + 4, 240 .bInterval = LOG2_STATUS_INTERVAL_MSEC + 4,
241}; 241};
242static struct usb_endpoint_descriptor hs_ecm_in_desc __initdata = { 242static struct usb_endpoint_descriptor hs_ecm_in_desc __initdata = {
@@ -245,7 +245,7 @@ static struct usb_endpoint_descriptor hs_ecm_in_desc __initdata = {
245 245
246 .bEndpointAddress = USB_DIR_IN, 246 .bEndpointAddress = USB_DIR_IN,
247 .bmAttributes = USB_ENDPOINT_XFER_BULK, 247 .bmAttributes = USB_ENDPOINT_XFER_BULK,
248 .wMaxPacketSize = __constant_cpu_to_le16(512), 248 .wMaxPacketSize = cpu_to_le16(512),
249}; 249};
250 250
251static struct usb_endpoint_descriptor hs_ecm_out_desc __initdata = { 251static struct usb_endpoint_descriptor hs_ecm_out_desc __initdata = {
@@ -254,7 +254,7 @@ static struct usb_endpoint_descriptor hs_ecm_out_desc __initdata = {
254 254
255 .bEndpointAddress = USB_DIR_OUT, 255 .bEndpointAddress = USB_DIR_OUT,
256 .bmAttributes = USB_ENDPOINT_XFER_BULK, 256 .bmAttributes = USB_ENDPOINT_XFER_BULK,
257 .wMaxPacketSize = __constant_cpu_to_le16(512), 257 .wMaxPacketSize = cpu_to_le16(512),
258}; 258};
259 259
260static struct usb_descriptor_header *ecm_hs_function[] __initdata = { 260static struct usb_descriptor_header *ecm_hs_function[] __initdata = {
diff --git a/drivers/usb/gadget/f_loopback.c b/drivers/usb/gadget/f_loopback.c
index 8affe1dfc2c1..83301bdcdd1a 100644
--- a/drivers/usb/gadget/f_loopback.c
+++ b/drivers/usb/gadget/f_loopback.c
@@ -100,7 +100,7 @@ static struct usb_endpoint_descriptor hs_loop_source_desc = {
100 .bDescriptorType = USB_DT_ENDPOINT, 100 .bDescriptorType = USB_DT_ENDPOINT,
101 101
102 .bmAttributes = USB_ENDPOINT_XFER_BULK, 102 .bmAttributes = USB_ENDPOINT_XFER_BULK,
103 .wMaxPacketSize = __constant_cpu_to_le16(512), 103 .wMaxPacketSize = cpu_to_le16(512),
104}; 104};
105 105
106static struct usb_endpoint_descriptor hs_loop_sink_desc = { 106static struct usb_endpoint_descriptor hs_loop_sink_desc = {
@@ -108,7 +108,7 @@ static struct usb_endpoint_descriptor hs_loop_sink_desc = {
108 .bDescriptorType = USB_DT_ENDPOINT, 108 .bDescriptorType = USB_DT_ENDPOINT,
109 109
110 .bmAttributes = USB_ENDPOINT_XFER_BULK, 110 .bmAttributes = USB_ENDPOINT_XFER_BULK,
111 .wMaxPacketSize = __constant_cpu_to_le16(512), 111 .wMaxPacketSize = cpu_to_le16(512),
112}; 112};
113 113
114static struct usb_descriptor_header *hs_loopback_descs[] = { 114static struct usb_descriptor_header *hs_loopback_descs[] = {
diff --git a/drivers/usb/gadget/f_obex.c b/drivers/usb/gadget/f_obex.c
index 38aa896cc5db..46d6266f30ec 100644
--- a/drivers/usb/gadget/f_obex.c
+++ b/drivers/usb/gadget/f_obex.c
@@ -123,7 +123,7 @@ static struct usb_cdc_header_desc obex_cdc_header_desc __initdata = {
123 .bLength = sizeof(obex_cdc_header_desc), 123 .bLength = sizeof(obex_cdc_header_desc),
124 .bDescriptorType = USB_DT_CS_INTERFACE, 124 .bDescriptorType = USB_DT_CS_INTERFACE,
125 .bDescriptorSubType = USB_CDC_HEADER_TYPE, 125 .bDescriptorSubType = USB_CDC_HEADER_TYPE,
126 .bcdCDC = __constant_cpu_to_le16(0x0120), 126 .bcdCDC = cpu_to_le16(0x0120),
127}; 127};
128 128
129static struct usb_cdc_union_desc obex_cdc_union_desc __initdata = { 129static struct usb_cdc_union_desc obex_cdc_union_desc __initdata = {
@@ -138,7 +138,7 @@ static struct usb_cdc_obex_desc obex_desc __initdata = {
138 .bLength = sizeof(obex_desc), 138 .bLength = sizeof(obex_desc),
139 .bDescriptorType = USB_DT_CS_INTERFACE, 139 .bDescriptorType = USB_DT_CS_INTERFACE,
140 .bDescriptorSubType = USB_CDC_OBEX_TYPE, 140 .bDescriptorSubType = USB_CDC_OBEX_TYPE,
141 .bcdVersion = __constant_cpu_to_le16(0x0100), 141 .bcdVersion = cpu_to_le16(0x0100),
142}; 142};
143 143
144/* High-Speed Support */ 144/* High-Speed Support */
@@ -149,7 +149,7 @@ static struct usb_endpoint_descriptor obex_hs_ep_out_desc __initdata = {
149 149
150 .bEndpointAddress = USB_DIR_OUT, 150 .bEndpointAddress = USB_DIR_OUT,
151 .bmAttributes = USB_ENDPOINT_XFER_BULK, 151 .bmAttributes = USB_ENDPOINT_XFER_BULK,
152 .wMaxPacketSize = __constant_cpu_to_le16(512), 152 .wMaxPacketSize = cpu_to_le16(512),
153}; 153};
154 154
155static struct usb_endpoint_descriptor obex_hs_ep_in_desc __initdata = { 155static struct usb_endpoint_descriptor obex_hs_ep_in_desc __initdata = {
@@ -158,7 +158,7 @@ static struct usb_endpoint_descriptor obex_hs_ep_in_desc __initdata = {
158 158
159 .bEndpointAddress = USB_DIR_IN, 159 .bEndpointAddress = USB_DIR_IN,
160 .bmAttributes = USB_ENDPOINT_XFER_BULK, 160 .bmAttributes = USB_ENDPOINT_XFER_BULK,
161 .wMaxPacketSize = __constant_cpu_to_le16(512), 161 .wMaxPacketSize = cpu_to_le16(512),
162}; 162};
163 163
164static struct usb_descriptor_header *hs_function[] __initdata = { 164static struct usb_descriptor_header *hs_function[] __initdata = {
diff --git a/drivers/usb/gadget/f_phonet.c b/drivers/usb/gadget/f_phonet.c
index c0916c7b217e..c1abeb89b413 100644
--- a/drivers/usb/gadget/f_phonet.c
+++ b/drivers/usb/gadget/f_phonet.c
@@ -79,7 +79,7 @@ pn_header_desc = {
79 .bLength = sizeof pn_header_desc, 79 .bLength = sizeof pn_header_desc,
80 .bDescriptorType = USB_DT_CS_INTERFACE, 80 .bDescriptorType = USB_DT_CS_INTERFACE,
81 .bDescriptorSubType = USB_CDC_HEADER_TYPE, 81 .bDescriptorSubType = USB_CDC_HEADER_TYPE,
82 .bcdCDC = __constant_cpu_to_le16(0x0110), 82 .bcdCDC = cpu_to_le16(0x0110),
83}; 83};
84 84
85static const struct usb_cdc_header_desc 85static const struct usb_cdc_header_desc
@@ -87,7 +87,7 @@ pn_phonet_desc = {
87 .bLength = sizeof pn_phonet_desc, 87 .bLength = sizeof pn_phonet_desc,
88 .bDescriptorType = USB_DT_CS_INTERFACE, 88 .bDescriptorType = USB_DT_CS_INTERFACE,
89 .bDescriptorSubType = USB_CDC_PHONET_TYPE, 89 .bDescriptorSubType = USB_CDC_PHONET_TYPE,
90 .bcdCDC = __constant_cpu_to_le16(0x1505), /* ??? */ 90 .bcdCDC = cpu_to_le16(0x1505), /* ??? */
91}; 91};
92 92
93static struct usb_cdc_union_desc 93static struct usb_cdc_union_desc
@@ -138,7 +138,7 @@ pn_hs_sink_desc = {
138 138
139 .bEndpointAddress = USB_DIR_OUT, 139 .bEndpointAddress = USB_DIR_OUT,
140 .bmAttributes = USB_ENDPOINT_XFER_BULK, 140 .bmAttributes = USB_ENDPOINT_XFER_BULK,
141 .wMaxPacketSize = __constant_cpu_to_le16(512), 141 .wMaxPacketSize = cpu_to_le16(512),
142}; 142};
143 143
144static struct usb_endpoint_descriptor 144static struct usb_endpoint_descriptor
@@ -157,7 +157,7 @@ pn_hs_source_desc = {
157 157
158 .bEndpointAddress = USB_DIR_IN, 158 .bEndpointAddress = USB_DIR_IN,
159 .bmAttributes = USB_ENDPOINT_XFER_BULK, 159 .bmAttributes = USB_ENDPOINT_XFER_BULK,
160 .wMaxPacketSize = __constant_cpu_to_le16(512), 160 .wMaxPacketSize = cpu_to_le16(512),
161}; 161};
162 162
163static struct usb_descriptor_header *fs_pn_function[] = { 163static struct usb_descriptor_header *fs_pn_function[] = {
diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c
index fd7b356f902d..3279a4726042 100644
--- a/drivers/usb/gadget/f_rndis.c
+++ b/drivers/usb/gadget/f_rndis.c
@@ -137,7 +137,7 @@ static struct usb_cdc_header_desc header_desc __initdata = {
137 .bDescriptorType = USB_DT_CS_INTERFACE, 137 .bDescriptorType = USB_DT_CS_INTERFACE,
138 .bDescriptorSubType = USB_CDC_HEADER_TYPE, 138 .bDescriptorSubType = USB_CDC_HEADER_TYPE,
139 139
140 .bcdCDC = __constant_cpu_to_le16(0x0110), 140 .bcdCDC = cpu_to_le16(0x0110),
141}; 141};
142 142
143static struct usb_cdc_call_mgmt_descriptor call_mgmt_descriptor __initdata = { 143static struct usb_cdc_call_mgmt_descriptor call_mgmt_descriptor __initdata = {
@@ -187,7 +187,7 @@ static struct usb_endpoint_descriptor fs_notify_desc __initdata = {
187 187
188 .bEndpointAddress = USB_DIR_IN, 188 .bEndpointAddress = USB_DIR_IN,
189 .bmAttributes = USB_ENDPOINT_XFER_INT, 189 .bmAttributes = USB_ENDPOINT_XFER_INT,
190 .wMaxPacketSize = __constant_cpu_to_le16(STATUS_BYTECOUNT), 190 .wMaxPacketSize = cpu_to_le16(STATUS_BYTECOUNT),
191 .bInterval = 1 << LOG2_STATUS_INTERVAL_MSEC, 191 .bInterval = 1 << LOG2_STATUS_INTERVAL_MSEC,
192}; 192};
193 193
@@ -230,7 +230,7 @@ static struct usb_endpoint_descriptor hs_notify_desc __initdata = {
230 230
231 .bEndpointAddress = USB_DIR_IN, 231 .bEndpointAddress = USB_DIR_IN,
232 .bmAttributes = USB_ENDPOINT_XFER_INT, 232 .bmAttributes = USB_ENDPOINT_XFER_INT,
233 .wMaxPacketSize = __constant_cpu_to_le16(STATUS_BYTECOUNT), 233 .wMaxPacketSize = cpu_to_le16(STATUS_BYTECOUNT),
234 .bInterval = LOG2_STATUS_INTERVAL_MSEC + 4, 234 .bInterval = LOG2_STATUS_INTERVAL_MSEC + 4,
235}; 235};
236static struct usb_endpoint_descriptor hs_in_desc __initdata = { 236static struct usb_endpoint_descriptor hs_in_desc __initdata = {
@@ -239,7 +239,7 @@ static struct usb_endpoint_descriptor hs_in_desc __initdata = {
239 239
240 .bEndpointAddress = USB_DIR_IN, 240 .bEndpointAddress = USB_DIR_IN,
241 .bmAttributes = USB_ENDPOINT_XFER_BULK, 241 .bmAttributes = USB_ENDPOINT_XFER_BULK,
242 .wMaxPacketSize = __constant_cpu_to_le16(512), 242 .wMaxPacketSize = cpu_to_le16(512),
243}; 243};
244 244
245static struct usb_endpoint_descriptor hs_out_desc __initdata = { 245static struct usb_endpoint_descriptor hs_out_desc __initdata = {
@@ -248,7 +248,7 @@ static struct usb_endpoint_descriptor hs_out_desc __initdata = {
248 248
249 .bEndpointAddress = USB_DIR_OUT, 249 .bEndpointAddress = USB_DIR_OUT,
250 .bmAttributes = USB_ENDPOINT_XFER_BULK, 250 .bmAttributes = USB_ENDPOINT_XFER_BULK,
251 .wMaxPacketSize = __constant_cpu_to_le16(512), 251 .wMaxPacketSize = cpu_to_le16(512),
252}; 252};
253 253
254static struct usb_descriptor_header *eth_hs_function[] __initdata = { 254static struct usb_descriptor_header *eth_hs_function[] __initdata = {
diff --git a/drivers/usb/gadget/f_serial.c b/drivers/usb/gadget/f_serial.c
index fe5674db344b..db0aa93606ef 100644
--- a/drivers/usb/gadget/f_serial.c
+++ b/drivers/usb/gadget/f_serial.c
@@ -89,14 +89,14 @@ static struct usb_endpoint_descriptor gser_hs_in_desc __initdata = {
89 .bLength = USB_DT_ENDPOINT_SIZE, 89 .bLength = USB_DT_ENDPOINT_SIZE,
90 .bDescriptorType = USB_DT_ENDPOINT, 90 .bDescriptorType = USB_DT_ENDPOINT,
91 .bmAttributes = USB_ENDPOINT_XFER_BULK, 91 .bmAttributes = USB_ENDPOINT_XFER_BULK,
92 .wMaxPacketSize = __constant_cpu_to_le16(512), 92 .wMaxPacketSize = cpu_to_le16(512),
93}; 93};
94 94
95static struct usb_endpoint_descriptor gser_hs_out_desc __initdata = { 95static struct usb_endpoint_descriptor gser_hs_out_desc __initdata = {
96 .bLength = USB_DT_ENDPOINT_SIZE, 96 .bLength = USB_DT_ENDPOINT_SIZE,
97 .bDescriptorType = USB_DT_ENDPOINT, 97 .bDescriptorType = USB_DT_ENDPOINT,
98 .bmAttributes = USB_ENDPOINT_XFER_BULK, 98 .bmAttributes = USB_ENDPOINT_XFER_BULK,
99 .wMaxPacketSize = __constant_cpu_to_le16(512), 99 .wMaxPacketSize = cpu_to_le16(512),
100}; 100};
101 101
102static struct usb_descriptor_header *gser_hs_function[] __initdata = { 102static struct usb_descriptor_header *gser_hs_function[] __initdata = {
diff --git a/drivers/usb/gadget/f_sourcesink.c b/drivers/usb/gadget/f_sourcesink.c
index dc84d26d2835..6aca5c81414a 100644
--- a/drivers/usb/gadget/f_sourcesink.c
+++ b/drivers/usb/gadget/f_sourcesink.c
@@ -118,7 +118,7 @@ static struct usb_endpoint_descriptor hs_source_desc = {
118 .bDescriptorType = USB_DT_ENDPOINT, 118 .bDescriptorType = USB_DT_ENDPOINT,
119 119
120 .bmAttributes = USB_ENDPOINT_XFER_BULK, 120 .bmAttributes = USB_ENDPOINT_XFER_BULK,
121 .wMaxPacketSize = __constant_cpu_to_le16(512), 121 .wMaxPacketSize = cpu_to_le16(512),
122}; 122};
123 123
124static struct usb_endpoint_descriptor hs_sink_desc = { 124static struct usb_endpoint_descriptor hs_sink_desc = {
@@ -126,7 +126,7 @@ static struct usb_endpoint_descriptor hs_sink_desc = {
126 .bDescriptorType = USB_DT_ENDPOINT, 126 .bDescriptorType = USB_DT_ENDPOINT,
127 127
128 .bmAttributes = USB_ENDPOINT_XFER_BULK, 128 .bmAttributes = USB_ENDPOINT_XFER_BULK,
129 .wMaxPacketSize = __constant_cpu_to_le16(512), 129 .wMaxPacketSize = cpu_to_le16(512),
130}; 130};
131 131
132static struct usb_descriptor_header *hs_source_sink_descs[] = { 132static struct usb_descriptor_header *hs_source_sink_descs[] = {
diff --git a/drivers/usb/gadget/f_subset.c b/drivers/usb/gadget/f_subset.c
index fe1832875771..a9c98fdb626d 100644
--- a/drivers/usb/gadget/f_subset.c
+++ b/drivers/usb/gadget/f_subset.c
@@ -108,7 +108,7 @@ static struct usb_cdc_header_desc mdlm_header_desc __initdata = {
108 .bDescriptorType = USB_DT_CS_INTERFACE, 108 .bDescriptorType = USB_DT_CS_INTERFACE,
109 .bDescriptorSubType = USB_CDC_HEADER_TYPE, 109 .bDescriptorSubType = USB_CDC_HEADER_TYPE,
110 110
111 .bcdCDC = __constant_cpu_to_le16(0x0110), 111 .bcdCDC = cpu_to_le16(0x0110),
112}; 112};
113 113
114static struct usb_cdc_mdlm_desc mdlm_desc __initdata = { 114static struct usb_cdc_mdlm_desc mdlm_desc __initdata = {
@@ -116,7 +116,7 @@ static struct usb_cdc_mdlm_desc mdlm_desc __initdata = {
116 .bDescriptorType = USB_DT_CS_INTERFACE, 116 .bDescriptorType = USB_DT_CS_INTERFACE,
117 .bDescriptorSubType = USB_CDC_MDLM_TYPE, 117 .bDescriptorSubType = USB_CDC_MDLM_TYPE,
118 118
119 .bcdVersion = __constant_cpu_to_le16(0x0100), 119 .bcdVersion = cpu_to_le16(0x0100),
120 .bGUID = { 120 .bGUID = {
121 0x5d, 0x34, 0xcf, 0x66, 0x11, 0x18, 0x11, 0xd6, 121 0x5d, 0x34, 0xcf, 0x66, 0x11, 0x18, 0x11, 0xd6,
122 0xa2, 0x1a, 0x00, 0x01, 0x02, 0xca, 0x9a, 0x7f, 122 0xa2, 0x1a, 0x00, 0x01, 0x02, 0xca, 0x9a, 0x7f,
@@ -144,9 +144,9 @@ static struct usb_cdc_ether_desc ether_desc __initdata = {
144 144
145 /* this descriptor actually adds value, surprise! */ 145 /* this descriptor actually adds value, surprise! */
146 /* .iMACAddress = DYNAMIC */ 146 /* .iMACAddress = DYNAMIC */
147 .bmEthernetStatistics = __constant_cpu_to_le32(0), /* no statistics */ 147 .bmEthernetStatistics = cpu_to_le32(0), /* no statistics */
148 .wMaxSegmentSize = __constant_cpu_to_le16(ETH_FRAME_LEN), 148 .wMaxSegmentSize = cpu_to_le16(ETH_FRAME_LEN),
149 .wNumberMCFilters = __constant_cpu_to_le16(0), 149 .wNumberMCFilters = cpu_to_le16(0),
150 .bNumberPowerFilters = 0, 150 .bNumberPowerFilters = 0,
151}; 151};
152 152
@@ -186,7 +186,7 @@ static struct usb_endpoint_descriptor hs_subset_in_desc __initdata = {
186 .bDescriptorType = USB_DT_ENDPOINT, 186 .bDescriptorType = USB_DT_ENDPOINT,
187 187
188 .bmAttributes = USB_ENDPOINT_XFER_BULK, 188 .bmAttributes = USB_ENDPOINT_XFER_BULK,
189 .wMaxPacketSize = __constant_cpu_to_le16(512), 189 .wMaxPacketSize = cpu_to_le16(512),
190}; 190};
191 191
192static struct usb_endpoint_descriptor hs_subset_out_desc __initdata = { 192static struct usb_endpoint_descriptor hs_subset_out_desc __initdata = {
@@ -194,7 +194,7 @@ static struct usb_endpoint_descriptor hs_subset_out_desc __initdata = {
194 .bDescriptorType = USB_DT_ENDPOINT, 194 .bDescriptorType = USB_DT_ENDPOINT,
195 195
196 .bmAttributes = USB_ENDPOINT_XFER_BULK, 196 .bmAttributes = USB_ENDPOINT_XFER_BULK,
197 .wMaxPacketSize = __constant_cpu_to_le16(512), 197 .wMaxPacketSize = cpu_to_le16(512),
198}; 198};
199 199
200static struct usb_descriptor_header *hs_eth_function[] __initdata = { 200static struct usb_descriptor_header *hs_eth_function[] __initdata = {
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c
index 1ab9dac7e12d..d3c2464dee82 100644
--- a/drivers/usb/gadget/file_storage.c
+++ b/drivers/usb/gadget/file_storage.c
@@ -847,13 +847,13 @@ device_desc = {
847 .bLength = sizeof device_desc, 847 .bLength = sizeof device_desc,
848 .bDescriptorType = USB_DT_DEVICE, 848 .bDescriptorType = USB_DT_DEVICE,
849 849
850 .bcdUSB = __constant_cpu_to_le16(0x0200), 850 .bcdUSB = cpu_to_le16(0x0200),
851 .bDeviceClass = USB_CLASS_PER_INTERFACE, 851 .bDeviceClass = USB_CLASS_PER_INTERFACE,
852 852
853 /* The next three values can be overridden by module parameters */ 853 /* The next three values can be overridden by module parameters */
854 .idVendor = __constant_cpu_to_le16(DRIVER_VENDOR_ID), 854 .idVendor = cpu_to_le16(DRIVER_VENDOR_ID),
855 .idProduct = __constant_cpu_to_le16(DRIVER_PRODUCT_ID), 855 .idProduct = cpu_to_le16(DRIVER_PRODUCT_ID),
856 .bcdDevice = __constant_cpu_to_le16(0xffff), 856 .bcdDevice = cpu_to_le16(0xffff),
857 857
858 .iManufacturer = STRING_MANUFACTURER, 858 .iManufacturer = STRING_MANUFACTURER,
859 .iProduct = STRING_PRODUCT, 859 .iProduct = STRING_PRODUCT,
@@ -926,7 +926,7 @@ fs_intr_in_desc = {
926 926
927 .bEndpointAddress = USB_DIR_IN, 927 .bEndpointAddress = USB_DIR_IN,
928 .bmAttributes = USB_ENDPOINT_XFER_INT, 928 .bmAttributes = USB_ENDPOINT_XFER_INT,
929 .wMaxPacketSize = __constant_cpu_to_le16(2), 929 .wMaxPacketSize = cpu_to_le16(2),
930 .bInterval = 32, // frames -> 32 ms 930 .bInterval = 32, // frames -> 32 ms
931}; 931};
932 932
@@ -954,7 +954,7 @@ dev_qualifier = {
954 .bLength = sizeof dev_qualifier, 954 .bLength = sizeof dev_qualifier,
955 .bDescriptorType = USB_DT_DEVICE_QUALIFIER, 955 .bDescriptorType = USB_DT_DEVICE_QUALIFIER,
956 956
957 .bcdUSB = __constant_cpu_to_le16(0x0200), 957 .bcdUSB = cpu_to_le16(0x0200),
958 .bDeviceClass = USB_CLASS_PER_INTERFACE, 958 .bDeviceClass = USB_CLASS_PER_INTERFACE,
959 959
960 .bNumConfigurations = 1, 960 .bNumConfigurations = 1,
@@ -967,7 +967,7 @@ hs_bulk_in_desc = {
967 967
968 /* bEndpointAddress copied from fs_bulk_in_desc during fsg_bind() */ 968 /* bEndpointAddress copied from fs_bulk_in_desc during fsg_bind() */
969 .bmAttributes = USB_ENDPOINT_XFER_BULK, 969 .bmAttributes = USB_ENDPOINT_XFER_BULK,
970 .wMaxPacketSize = __constant_cpu_to_le16(512), 970 .wMaxPacketSize = cpu_to_le16(512),
971}; 971};
972 972
973static struct usb_endpoint_descriptor 973static struct usb_endpoint_descriptor
@@ -977,7 +977,7 @@ hs_bulk_out_desc = {
977 977
978 /* bEndpointAddress copied from fs_bulk_out_desc during fsg_bind() */ 978 /* bEndpointAddress copied from fs_bulk_out_desc during fsg_bind() */
979 .bmAttributes = USB_ENDPOINT_XFER_BULK, 979 .bmAttributes = USB_ENDPOINT_XFER_BULK,
980 .wMaxPacketSize = __constant_cpu_to_le16(512), 980 .wMaxPacketSize = cpu_to_le16(512),
981 .bInterval = 1, // NAK every 1 uframe 981 .bInterval = 1, // NAK every 1 uframe
982}; 982};
983 983
@@ -988,7 +988,7 @@ hs_intr_in_desc = {
988 988
989 /* bEndpointAddress copied from fs_intr_in_desc during fsg_bind() */ 989 /* bEndpointAddress copied from fs_intr_in_desc during fsg_bind() */
990 .bmAttributes = USB_ENDPOINT_XFER_INT, 990 .bmAttributes = USB_ENDPOINT_XFER_INT,
991 .wMaxPacketSize = __constant_cpu_to_le16(2), 991 .wMaxPacketSize = cpu_to_le16(2),
992 .bInterval = 9, // 2**(9-1) = 256 uframes -> 32 ms 992 .bInterval = 9, // 2**(9-1) = 256 uframes -> 32 ms
993}; 993};
994 994
@@ -2646,7 +2646,7 @@ static int send_status(struct fsg_dev *fsg)
2646 struct bulk_cs_wrap *csw = bh->buf; 2646 struct bulk_cs_wrap *csw = bh->buf;
2647 2647
2648 /* Store and send the Bulk-only CSW */ 2648 /* Store and send the Bulk-only CSW */
2649 csw->Signature = __constant_cpu_to_le32(USB_BULK_CS_SIG); 2649 csw->Signature = cpu_to_le32(USB_BULK_CS_SIG);
2650 csw->Tag = fsg->tag; 2650 csw->Tag = fsg->tag;
2651 csw->Residue = cpu_to_le32(fsg->residue); 2651 csw->Residue = cpu_to_le32(fsg->residue);
2652 csw->Status = status; 2652 csw->Status = status;
@@ -3089,7 +3089,7 @@ static int received_cbw(struct fsg_dev *fsg, struct fsg_buffhd *bh)
3089 3089
3090 /* Is the CBW valid? */ 3090 /* Is the CBW valid? */
3091 if (req->actual != USB_BULK_CB_WRAP_LEN || 3091 if (req->actual != USB_BULK_CB_WRAP_LEN ||
3092 cbw->Signature != __constant_cpu_to_le32( 3092 cbw->Signature != cpu_to_le32(
3093 USB_BULK_CB_SIG)) { 3093 USB_BULK_CB_SIG)) {
3094 DBG(fsg, "invalid CBW: len %u sig 0x%x\n", 3094 DBG(fsg, "invalid CBW: len %u sig 0x%x\n",
3095 req->actual, 3095 req->actual,
diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c
index 60d3f9e9b51f..bb738bc96d4a 100644
--- a/drivers/usb/gadget/gmidi.c
+++ b/drivers/usb/gadget/gmidi.c
@@ -199,10 +199,10 @@ DECLARE_USB_MS_ENDPOINT_DESCRIPTOR(1);
199static struct usb_device_descriptor device_desc = { 199static struct usb_device_descriptor device_desc = {
200 .bLength = USB_DT_DEVICE_SIZE, 200 .bLength = USB_DT_DEVICE_SIZE,
201 .bDescriptorType = USB_DT_DEVICE, 201 .bDescriptorType = USB_DT_DEVICE,
202 .bcdUSB = __constant_cpu_to_le16(0x0200), 202 .bcdUSB = cpu_to_le16(0x0200),
203 .bDeviceClass = USB_CLASS_PER_INTERFACE, 203 .bDeviceClass = USB_CLASS_PER_INTERFACE,
204 .idVendor = __constant_cpu_to_le16(DRIVER_VENDOR_NUM), 204 .idVendor = cpu_to_le16(DRIVER_VENDOR_NUM),
205 .idProduct = __constant_cpu_to_le16(DRIVER_PRODUCT_NUM), 205 .idProduct = cpu_to_le16(DRIVER_PRODUCT_NUM),
206 .iManufacturer = STRING_MANUFACTURER, 206 .iManufacturer = STRING_MANUFACTURER,
207 .iProduct = STRING_PRODUCT, 207 .iProduct = STRING_PRODUCT,
208 .bNumConfigurations = 1, 208 .bNumConfigurations = 1,
@@ -241,8 +241,8 @@ static const struct usb_ac_header_descriptor_1 ac_header_desc = {
241 .bLength = USB_DT_AC_HEADER_SIZE(1), 241 .bLength = USB_DT_AC_HEADER_SIZE(1),
242 .bDescriptorType = USB_DT_CS_INTERFACE, 242 .bDescriptorType = USB_DT_CS_INTERFACE,
243 .bDescriptorSubtype = USB_MS_HEADER, 243 .bDescriptorSubtype = USB_MS_HEADER,
244 .bcdADC = __constant_cpu_to_le16(0x0100), 244 .bcdADC = cpu_to_le16(0x0100),
245 .wTotalLength = __constant_cpu_to_le16(USB_DT_AC_HEADER_SIZE(1)), 245 .wTotalLength = cpu_to_le16(USB_DT_AC_HEADER_SIZE(1)),
246 .bInCollection = 1, 246 .bInCollection = 1,
247 .baInterfaceNr = { 247 .baInterfaceNr = {
248 [0] = GMIDI_MS_INTERFACE, 248 [0] = GMIDI_MS_INTERFACE,
@@ -265,8 +265,8 @@ static const struct usb_ms_header_descriptor ms_header_desc = {
265 .bLength = USB_DT_MS_HEADER_SIZE, 265 .bLength = USB_DT_MS_HEADER_SIZE,
266 .bDescriptorType = USB_DT_CS_INTERFACE, 266 .bDescriptorType = USB_DT_CS_INTERFACE,
267 .bDescriptorSubtype = USB_MS_HEADER, 267 .bDescriptorSubtype = USB_MS_HEADER,
268 .bcdMSC = __constant_cpu_to_le16(0x0100), 268 .bcdMSC = cpu_to_le16(0x0100),
269 .wTotalLength = __constant_cpu_to_le16(USB_DT_MS_HEADER_SIZE 269 .wTotalLength = cpu_to_le16(USB_DT_MS_HEADER_SIZE
270 + 2*USB_DT_MIDI_IN_SIZE 270 + 2*USB_DT_MIDI_IN_SIZE
271 + 2*USB_DT_MIDI_OUT_SIZE(1)), 271 + 2*USB_DT_MIDI_OUT_SIZE(1)),
272}; 272};
@@ -1227,7 +1227,7 @@ autoconf_fail:
1227 */ 1227 */
1228 pr_warning("%s: controller '%s' not recognized\n", 1228 pr_warning("%s: controller '%s' not recognized\n",
1229 shortname, gadget->name); 1229 shortname, gadget->name);
1230 device_desc.bcdDevice = __constant_cpu_to_le16(0x9999); 1230 device_desc.bcdDevice = cpu_to_le16(0x9999);
1231 } 1231 }
1232 1232
1233 1233
diff --git a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c
index 63419c4d503c..de010c939dbb 100644
--- a/drivers/usb/gadget/goku_udc.c
+++ b/drivers/usb/gadget/goku_udc.c
@@ -1472,7 +1472,7 @@ static void ep0_setup(struct goku_udc *dev)
1472 /* active endpoint */ 1472 /* active endpoint */
1473 if (tmp > 3 || (!dev->ep[tmp].desc && tmp != 0)) 1473 if (tmp > 3 || (!dev->ep[tmp].desc && tmp != 0))
1474 goto stall; 1474 goto stall;
1475 if (ctrl.wIndex & __constant_cpu_to_le16( 1475 if (ctrl.wIndex & cpu_to_le16(
1476 USB_DIR_IN)) { 1476 USB_DIR_IN)) {
1477 if (!dev->ep[tmp].is_in) 1477 if (!dev->ep[tmp].is_in)
1478 goto stall; 1478 goto stall;
@@ -1480,7 +1480,7 @@ static void ep0_setup(struct goku_udc *dev)
1480 if (dev->ep[tmp].is_in) 1480 if (dev->ep[tmp].is_in)
1481 goto stall; 1481 goto stall;
1482 } 1482 }
1483 if (ctrl.wValue != __constant_cpu_to_le16( 1483 if (ctrl.wValue != cpu_to_le16(
1484 USB_ENDPOINT_HALT)) 1484 USB_ENDPOINT_HALT))
1485 goto stall; 1485 goto stall;
1486 if (tmp) 1486 if (tmp)
@@ -1493,7 +1493,7 @@ succeed:
1493 return; 1493 return;
1494 case USB_RECIP_DEVICE: 1494 case USB_RECIP_DEVICE:
1495 /* device remote wakeup: always clear */ 1495 /* device remote wakeup: always clear */
1496 if (ctrl.wValue != __constant_cpu_to_le16(1)) 1496 if (ctrl.wValue != cpu_to_le16(1))
1497 goto stall; 1497 goto stall;
1498 VDBG(dev, "clear dev remote wakeup\n"); 1498 VDBG(dev, "clear dev remote wakeup\n");
1499 goto succeed; 1499 goto succeed;
@@ -1519,7 +1519,7 @@ succeed:
1519 dev->req_config = (ctrl.bRequest == USB_REQ_SET_CONFIGURATION 1519 dev->req_config = (ctrl.bRequest == USB_REQ_SET_CONFIGURATION
1520 && ctrl.bRequestType == USB_RECIP_DEVICE); 1520 && ctrl.bRequestType == USB_RECIP_DEVICE);
1521 if (unlikely(dev->req_config)) 1521 if (unlikely(dev->req_config))
1522 dev->configured = (ctrl.wValue != __constant_cpu_to_le16(0)); 1522 dev->configured = (ctrl.wValue != cpu_to_le16(0));
1523 1523
1524 /* delegate everything to the gadget driver. 1524 /* delegate everything to the gadget driver.
1525 * it may respond after this irq handler returns. 1525 * it may respond after this irq handler returns.
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c
index 317b48fdbf01..d20937f28a19 100644
--- a/drivers/usb/gadget/inode.c
+++ b/drivers/usb/gadget/inode.c
@@ -1334,7 +1334,7 @@ static void make_qualifier (struct dev_data *dev)
1334 1334
1335 qual.bLength = sizeof qual; 1335 qual.bLength = sizeof qual;
1336 qual.bDescriptorType = USB_DT_DEVICE_QUALIFIER; 1336 qual.bDescriptorType = USB_DT_DEVICE_QUALIFIER;
1337 qual.bcdUSB = __constant_cpu_to_le16 (0x0200); 1337 qual.bcdUSB = cpu_to_le16 (0x0200);
1338 1338
1339 desc = dev->dev; 1339 desc = dev->dev;
1340 qual.bDeviceClass = desc->bDeviceClass; 1340 qual.bDeviceClass = desc->bDeviceClass;
@@ -1908,7 +1908,7 @@ dev_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
1908 || dev->dev->bNumConfigurations != 1) 1908 || dev->dev->bNumConfigurations != 1)
1909 goto fail; 1909 goto fail;
1910 dev->dev->bNumConfigurations = 1; 1910 dev->dev->bNumConfigurations = 1;
1911 dev->dev->bcdUSB = __constant_cpu_to_le16 (0x0200); 1911 dev->dev->bcdUSB = cpu_to_le16 (0x0200);
1912 1912
1913 /* triggers gadgetfs_bind(); then we can enumerate. */ 1913 /* triggers gadgetfs_bind(); then we can enumerate. */
1914 spin_unlock_irq (&dev->lock); 1914 spin_unlock_irq (&dev->lock);
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c
index 12c6d83b218c..9498be87a724 100644
--- a/drivers/usb/gadget/net2280.c
+++ b/drivers/usb/gadget/net2280.c
@@ -142,8 +142,8 @@ static char *type_string (u8 bmAttributes)
142 142
143#include "net2280.h" 143#include "net2280.h"
144 144
145#define valid_bit __constant_cpu_to_le32 (1 << VALID_BIT) 145#define valid_bit cpu_to_le32 (1 << VALID_BIT)
146#define dma_done_ie __constant_cpu_to_le32 (1 << DMA_DONE_INTERRUPT_ENABLE) 146#define dma_done_ie cpu_to_le32 (1 << DMA_DONE_INTERRUPT_ENABLE)
147 147
148/*-------------------------------------------------------------------------*/ 148/*-------------------------------------------------------------------------*/
149 149
@@ -425,7 +425,7 @@ net2280_alloc_request (struct usb_ep *_ep, gfp_t gfp_flags)
425 return NULL; 425 return NULL;
426 } 426 }
427 td->dmacount = 0; /* not VALID */ 427 td->dmacount = 0; /* not VALID */
428 td->dmaaddr = __constant_cpu_to_le32 (DMA_ADDR_INVALID); 428 td->dmaaddr = cpu_to_le32 (DMA_ADDR_INVALID);
429 td->dmadesc = td->dmaaddr; 429 td->dmadesc = td->dmaaddr;
430 req->td = td; 430 req->td = td;
431 } 431 }
@@ -775,7 +775,7 @@ static void start_dma (struct net2280_ep *ep, struct net2280_request *req)
775 fill_dma_desc (ep, req, 1); 775 fill_dma_desc (ep, req, 1);
776 776
777 if (!use_dma_chaining) 777 if (!use_dma_chaining)
778 req->td->dmacount |= __constant_cpu_to_le32 (1 << END_OF_CHAIN); 778 req->td->dmacount |= cpu_to_le32 (1 << END_OF_CHAIN);
779 779
780 start_queue (ep, tmp, req->td_dma); 780 start_queue (ep, tmp, req->td_dma);
781} 781}
@@ -2407,9 +2407,9 @@ static void handle_stat0_irqs (struct net2280 *dev, u32 stat)
2407 2407
2408 if (readl (&e->regs->ep_rsp) 2408 if (readl (&e->regs->ep_rsp)
2409 & (1 << SET_ENDPOINT_HALT)) 2409 & (1 << SET_ENDPOINT_HALT))
2410 status = __constant_cpu_to_le32 (1); 2410 status = cpu_to_le32 (1);
2411 else 2411 else
2412 status = __constant_cpu_to_le32 (0); 2412 status = cpu_to_le32 (0);
2413 2413
2414 /* don't bother with a request object! */ 2414 /* don't bother with a request object! */
2415 writel (0, &dev->epregs [0].ep_irqenb); 2415 writel (0, &dev->epregs [0].ep_irqenb);
@@ -2667,7 +2667,7 @@ static void handle_stat1_irqs (struct net2280 *dev, u32 stat)
2667 req = list_entry (ep->queue.next, 2667 req = list_entry (ep->queue.next,
2668 struct net2280_request, queue); 2668 struct net2280_request, queue);
2669 dmacount = req->td->dmacount; 2669 dmacount = req->td->dmacount;
2670 dmacount &= __constant_cpu_to_le32 ( 2670 dmacount &= cpu_to_le32 (
2671 (1 << VALID_BIT) 2671 (1 << VALID_BIT)
2672 | DMA_BYTE_COUNT_MASK); 2672 | DMA_BYTE_COUNT_MASK);
2673 if (dmacount && (dmacount & valid_bit) == 0) 2673 if (dmacount && (dmacount & valid_bit) == 0)
@@ -2881,7 +2881,7 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id)
2881 goto done; 2881 goto done;
2882 } 2882 }
2883 td->dmacount = 0; /* not VALID */ 2883 td->dmacount = 0; /* not VALID */
2884 td->dmaaddr = __constant_cpu_to_le32 (DMA_ADDR_INVALID); 2884 td->dmaaddr = cpu_to_le32 (DMA_ADDR_INVALID);
2885 td->dmadesc = td->dmaaddr; 2885 td->dmadesc = td->dmaaddr;
2886 dev->ep [i].dummy = td; 2886 dev->ep [i].dummy = td;
2887 } 2887 }
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c
index 5a3034fdfe47..29500154d00c 100644
--- a/drivers/usb/gadget/printer.c
+++ b/drivers/usb/gadget/printer.c
@@ -225,12 +225,12 @@ module_param(qlen, uint, S_IRUGO|S_IWUSR);
225static struct usb_device_descriptor device_desc = { 225static struct usb_device_descriptor device_desc = {
226 .bLength = sizeof device_desc, 226 .bLength = sizeof device_desc,
227 .bDescriptorType = USB_DT_DEVICE, 227 .bDescriptorType = USB_DT_DEVICE,
228 .bcdUSB = __constant_cpu_to_le16(0x0200), 228 .bcdUSB = cpu_to_le16(0x0200),
229 .bDeviceClass = USB_CLASS_PER_INTERFACE, 229 .bDeviceClass = USB_CLASS_PER_INTERFACE,
230 .bDeviceSubClass = 0, 230 .bDeviceSubClass = 0,
231 .bDeviceProtocol = 0, 231 .bDeviceProtocol = 0,
232 .idVendor = __constant_cpu_to_le16(PRINTER_VENDOR_NUM), 232 .idVendor = cpu_to_le16(PRINTER_VENDOR_NUM),
233 .idProduct = __constant_cpu_to_le16(PRINTER_PRODUCT_NUM), 233 .idProduct = cpu_to_le16(PRINTER_PRODUCT_NUM),
234 .iManufacturer = STRING_MANUFACTURER, 234 .iManufacturer = STRING_MANUFACTURER,
235 .iProduct = STRING_PRODUCT, 235 .iProduct = STRING_PRODUCT,
236 .iSerialNumber = STRING_SERIALNUM, 236 .iSerialNumber = STRING_SERIALNUM,
@@ -299,20 +299,20 @@ static struct usb_endpoint_descriptor hs_ep_in_desc = {
299 .bLength = USB_DT_ENDPOINT_SIZE, 299 .bLength = USB_DT_ENDPOINT_SIZE,
300 .bDescriptorType = USB_DT_ENDPOINT, 300 .bDescriptorType = USB_DT_ENDPOINT,
301 .bmAttributes = USB_ENDPOINT_XFER_BULK, 301 .bmAttributes = USB_ENDPOINT_XFER_BULK,
302 .wMaxPacketSize = __constant_cpu_to_le16(512) 302 .wMaxPacketSize = cpu_to_le16(512)
303}; 303};
304 304
305static struct usb_endpoint_descriptor hs_ep_out_desc = { 305static struct usb_endpoint_descriptor hs_ep_out_desc = {
306 .bLength = USB_DT_ENDPOINT_SIZE, 306 .bLength = USB_DT_ENDPOINT_SIZE,
307 .bDescriptorType = USB_DT_ENDPOINT, 307 .bDescriptorType = USB_DT_ENDPOINT,
308 .bmAttributes = USB_ENDPOINT_XFER_BULK, 308 .bmAttributes = USB_ENDPOINT_XFER_BULK,
309 .wMaxPacketSize = __constant_cpu_to_le16(512) 309 .wMaxPacketSize = cpu_to_le16(512)
310}; 310};
311 311
312static struct usb_qualifier_descriptor dev_qualifier = { 312static struct usb_qualifier_descriptor dev_qualifier = {
313 .bLength = sizeof dev_qualifier, 313 .bLength = sizeof dev_qualifier,
314 .bDescriptorType = USB_DT_DEVICE_QUALIFIER, 314 .bDescriptorType = USB_DT_DEVICE_QUALIFIER,
315 .bcdUSB = __constant_cpu_to_le16(0x0200), 315 .bcdUSB = cpu_to_le16(0x0200),
316 .bDeviceClass = USB_CLASS_PRINTER, 316 .bDeviceClass = USB_CLASS_PRINTER,
317 .bNumConfigurations = 1 317 .bNumConfigurations = 1
318}; 318};
@@ -1406,16 +1406,16 @@ printer_bind(struct usb_gadget *gadget)
1406 gadget->name); 1406 gadget->name);
1407 /* unrecognized, but safe unless bulk is REALLY quirky */ 1407 /* unrecognized, but safe unless bulk is REALLY quirky */
1408 device_desc.bcdDevice = 1408 device_desc.bcdDevice =
1409 __constant_cpu_to_le16(0xFFFF); 1409 cpu_to_le16(0xFFFF);
1410 } 1410 }
1411 snprintf(manufacturer, sizeof(manufacturer), "%s %s with %s", 1411 snprintf(manufacturer, sizeof(manufacturer), "%s %s with %s",
1412 init_utsname()->sysname, init_utsname()->release, 1412 init_utsname()->sysname, init_utsname()->release,
1413 gadget->name); 1413 gadget->name);
1414 1414
1415 device_desc.idVendor = 1415 device_desc.idVendor =
1416 __constant_cpu_to_le16(PRINTER_VENDOR_NUM); 1416 cpu_to_le16(PRINTER_VENDOR_NUM);
1417 device_desc.idProduct = 1417 device_desc.idProduct =
1418 __constant_cpu_to_le16(PRINTER_PRODUCT_NUM); 1418 cpu_to_le16(PRINTER_PRODUCT_NUM);
1419 1419
1420 /* support optional vendor/distro customization */ 1420 /* support optional vendor/distro customization */
1421 if (idVendor) { 1421 if (idVendor) {
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c
index 37879af1c433..f46a60962dab 100644
--- a/drivers/usb/gadget/serial.c
+++ b/drivers/usb/gadget/serial.c
@@ -87,12 +87,12 @@ static struct usb_gadget_strings *dev_strings[] = {
87static struct usb_device_descriptor device_desc = { 87static struct usb_device_descriptor device_desc = {
88 .bLength = USB_DT_DEVICE_SIZE, 88 .bLength = USB_DT_DEVICE_SIZE,
89 .bDescriptorType = USB_DT_DEVICE, 89 .bDescriptorType = USB_DT_DEVICE,
90 .bcdUSB = __constant_cpu_to_le16(0x0200), 90 .bcdUSB = cpu_to_le16(0x0200),
91 /* .bDeviceClass = f(use_acm) */ 91 /* .bDeviceClass = f(use_acm) */
92 .bDeviceSubClass = 0, 92 .bDeviceSubClass = 0,
93 .bDeviceProtocol = 0, 93 .bDeviceProtocol = 0,
94 /* .bMaxPacketSize0 = f(hardware) */ 94 /* .bMaxPacketSize0 = f(hardware) */
95 .idVendor = __constant_cpu_to_le16(GS_VENDOR_ID), 95 .idVendor = cpu_to_le16(GS_VENDOR_ID),
96 /* .idProduct = f(use_acm) */ 96 /* .idProduct = f(use_acm) */
97 /* .bcdDevice = f(hardware) */ 97 /* .bcdDevice = f(hardware) */
98 /* .iManufacturer = DYNAMIC */ 98 /* .iManufacturer = DYNAMIC */
@@ -216,7 +216,7 @@ static int __init gs_bind(struct usb_composite_dev *cdev)
216 pr_warning("gs_bind: controller '%s' not recognized\n", 216 pr_warning("gs_bind: controller '%s' not recognized\n",
217 gadget->name); 217 gadget->name);
218 device_desc.bcdDevice = 218 device_desc.bcdDevice =
219 __constant_cpu_to_le16(GS_VERSION_NUM | 0x0099); 219 cpu_to_le16(GS_VERSION_NUM | 0x0099);
220 } 220 }
221 221
222 if (gadget_is_otg(cdev->gadget)) { 222 if (gadget_is_otg(cdev->gadget)) {
@@ -255,19 +255,19 @@ static int __init init(void)
255 serial_config_driver.bConfigurationValue = 2; 255 serial_config_driver.bConfigurationValue = 2;
256 device_desc.bDeviceClass = USB_CLASS_COMM; 256 device_desc.bDeviceClass = USB_CLASS_COMM;
257 device_desc.idProduct = 257 device_desc.idProduct =
258 __constant_cpu_to_le16(GS_CDC_PRODUCT_ID); 258 cpu_to_le16(GS_CDC_PRODUCT_ID);
259 } else if (use_obex) { 259 } else if (use_obex) {
260 serial_config_driver.label = "CDC OBEX config"; 260 serial_config_driver.label = "CDC OBEX config";
261 serial_config_driver.bConfigurationValue = 3; 261 serial_config_driver.bConfigurationValue = 3;
262 device_desc.bDeviceClass = USB_CLASS_COMM; 262 device_desc.bDeviceClass = USB_CLASS_COMM;
263 device_desc.idProduct = 263 device_desc.idProduct =
264 __constant_cpu_to_le16(GS_CDC_OBEX_PRODUCT_ID); 264 cpu_to_le16(GS_CDC_OBEX_PRODUCT_ID);
265 } else { 265 } else {
266 serial_config_driver.label = "Generic Serial config"; 266 serial_config_driver.label = "Generic Serial config";
267 serial_config_driver.bConfigurationValue = 1; 267 serial_config_driver.bConfigurationValue = 1;
268 device_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC; 268 device_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
269 device_desc.idProduct = 269 device_desc.idProduct =
270 __constant_cpu_to_le16(GS_PRODUCT_ID); 270 cpu_to_le16(GS_PRODUCT_ID);
271 } 271 }
272 strings_dev[STRING_DESCRIPTION_IDX].s = serial_config_driver.label; 272 strings_dev[STRING_DESCRIPTION_IDX].s = serial_config_driver.label;
273 273
diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c
index 53d59287f2bc..0a4d99ab40d8 100644
--- a/drivers/usb/gadget/u_serial.c
+++ b/drivers/usb/gadget/u_serial.c
@@ -1092,7 +1092,7 @@ int __init gserial_setup(struct usb_gadget *g, unsigned count)
1092 gs_tty_driver->init_termios.c_ispeed = 9600; 1092 gs_tty_driver->init_termios.c_ispeed = 9600;
1093 gs_tty_driver->init_termios.c_ospeed = 9600; 1093 gs_tty_driver->init_termios.c_ospeed = 9600;
1094 1094
1095 coding.dwDTERate = __constant_cpu_to_le32(9600); 1095 coding.dwDTERate = cpu_to_le32(9600);
1096 coding.bCharFormat = 8; 1096 coding.bCharFormat = 8;
1097 coding.bParityType = USB_CDC_NO_PARITY; 1097 coding.bParityType = USB_CDC_NO_PARITY;
1098 coding.bDataBits = USB_CDC_1_STOP_BITS; 1098 coding.bDataBits = USB_CDC_1_STOP_BITS;
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c
index 361d9659ac48..20614dce8db9 100644
--- a/drivers/usb/gadget/zero.c
+++ b/drivers/usb/gadget/zero.c
@@ -113,11 +113,11 @@ static struct usb_device_descriptor device_desc = {
113 .bLength = sizeof device_desc, 113 .bLength = sizeof device_desc,
114 .bDescriptorType = USB_DT_DEVICE, 114 .bDescriptorType = USB_DT_DEVICE,
115 115
116 .bcdUSB = __constant_cpu_to_le16(0x0200), 116 .bcdUSB = cpu_to_le16(0x0200),
117 .bDeviceClass = USB_CLASS_VENDOR_SPEC, 117 .bDeviceClass = USB_CLASS_VENDOR_SPEC,
118 118
119 .idVendor = __constant_cpu_to_le16(DRIVER_VENDOR_NUM), 119 .idVendor = cpu_to_le16(DRIVER_VENDOR_NUM),
120 .idProduct = __constant_cpu_to_le16(DRIVER_PRODUCT_NUM), 120 .idProduct = cpu_to_le16(DRIVER_PRODUCT_NUM),
121 .bNumConfigurations = 2, 121 .bNumConfigurations = 2,
122}; 122};
123 123
@@ -265,7 +265,7 @@ static int __init zero_bind(struct usb_composite_dev *cdev)
265 */ 265 */
266 pr_warning("%s: controller '%s' not recognized\n", 266 pr_warning("%s: controller '%s' not recognized\n",
267 longname, gadget->name); 267 longname, gadget->name);
268 device_desc.bcdDevice = __constant_cpu_to_le16(0x9999); 268 device_desc.bcdDevice = cpu_to_le16(0x9999);
269 } 269 }
270 270
271 271
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index 1d0b49e3f192..ada5d2ba297b 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -563,7 +563,7 @@ static int qh_unlink_periodic(struct ehci_hcd *ehci, struct ehci_qh *qh)
563 // and this qh is active in the current uframe 563 // and this qh is active in the current uframe
564 // (and overlay token SplitXstate is false?) 564 // (and overlay token SplitXstate is false?)
565 // THEN 565 // THEN
566 // qh->hw_info1 |= __constant_cpu_to_hc32(1 << 7 /* "ignore" */); 566 // qh->hw_info1 |= cpu_to_hc32(1 << 7 /* "ignore" */);
567 567
568 /* high bandwidth, or otherwise part of every microframe */ 568 /* high bandwidth, or otherwise part of every microframe */
569 if ((period = qh->period) == 0) 569 if ((period = qh->period) == 0)
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index 9aba560fd569..6cff195e1a36 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -253,7 +253,7 @@ struct ehci_qtd {
253 253
254/* 254/*
255 * Now the following defines are not converted using the 255 * Now the following defines are not converted using the
256 * __constant_cpu_to_le32() macro anymore, since we have to support 256 * cpu_to_le32() macro anymore, since we have to support
257 * "dynamic" switching between be and le support, so that the driver 257 * "dynamic" switching between be and le support, so that the driver
258 * can be used on one system with SoC EHCI controller using big-endian 258 * can be used on one system with SoC EHCI controller using big-endian
259 * descriptors as well as a normal little-endian PCI EHCI controller. 259 * descriptors as well as a normal little-endian PCI EHCI controller.
diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
index 8ee2f4159845..3172c0fd2a6d 100644
--- a/drivers/usb/host/isp1760-hcd.c
+++ b/drivers/usb/host/isp1760-hcd.c
@@ -644,7 +644,7 @@ static void transform_add_int(struct isp1760_hcd *priv, struct isp1760_qh *qh,
644 644
645 if (urb->dev->speed != USB_SPEED_HIGH) { 645 if (urb->dev->speed != USB_SPEED_HIGH) {
646 /* split */ 646 /* split */
647 ptd->dw5 = __constant_cpu_to_le32(0x1c); 647 ptd->dw5 = cpu_to_le32(0x1c);
648 648
649 if (qh->period >= 32) 649 if (qh->period >= 32)
650 period = qh->period / 2; 650 period = qh->period / 2;
@@ -1054,7 +1054,7 @@ static void do_atl_int(struct usb_hcd *usb_hcd)
1054 priv_write_copy(priv, (u32 *)&ptd, usb_hcd->regs + 1054 priv_write_copy(priv, (u32 *)&ptd, usb_hcd->regs +
1055 atl_regs, sizeof(ptd)); 1055 atl_regs, sizeof(ptd));
1056 1056
1057 ptd.dw0 |= __constant_cpu_to_le32(PTD_VALID); 1057 ptd.dw0 |= cpu_to_le32(PTD_VALID);
1058 priv_write_copy(priv, (u32 *)&ptd, usb_hcd->regs + 1058 priv_write_copy(priv, (u32 *)&ptd, usb_hcd->regs +
1059 atl_regs, sizeof(ptd)); 1059 atl_regs, sizeof(ptd));
1060 1060
diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c
index 75548f7c716b..2947c69b3476 100644
--- a/drivers/usb/host/oxu210hp-hcd.c
+++ b/drivers/usb/host/oxu210hp-hcd.c
@@ -845,14 +845,14 @@ static inline void qh_update(struct oxu_hcd *oxu,
845 is_out = !(qtd->hw_token & cpu_to_le32(1 << 8)); 845 is_out = !(qtd->hw_token & cpu_to_le32(1 << 8));
846 epnum = (le32_to_cpup(&qh->hw_info1) >> 8) & 0x0f; 846 epnum = (le32_to_cpup(&qh->hw_info1) >> 8) & 0x0f;
847 if (unlikely(!usb_gettoggle(qh->dev, epnum, is_out))) { 847 if (unlikely(!usb_gettoggle(qh->dev, epnum, is_out))) {
848 qh->hw_token &= ~__constant_cpu_to_le32(QTD_TOGGLE); 848 qh->hw_token &= ~cpu_to_le32(QTD_TOGGLE);
849 usb_settoggle(qh->dev, epnum, is_out, 1); 849 usb_settoggle(qh->dev, epnum, is_out, 1);
850 } 850 }
851 } 851 }
852 852
853 /* HC must see latest qtd and qh data before we clear ACTIVE+HALT */ 853 /* HC must see latest qtd and qh data before we clear ACTIVE+HALT */
854 wmb(); 854 wmb();
855 qh->hw_token &= __constant_cpu_to_le32(QTD_TOGGLE | QTD_STS_PING); 855 qh->hw_token &= cpu_to_le32(QTD_TOGGLE | QTD_STS_PING);
856} 856}
857 857
858/* If it weren't for a common silicon quirk (writing the dummy into the qh 858/* If it weren't for a common silicon quirk (writing the dummy into the qh
@@ -937,7 +937,7 @@ __acquires(oxu->lock)
937 struct ehci_qh *qh = (struct ehci_qh *) urb->hcpriv; 937 struct ehci_qh *qh = (struct ehci_qh *) urb->hcpriv;
938 938
939 /* S-mask in a QH means it's an interrupt urb */ 939 /* S-mask in a QH means it's an interrupt urb */
940 if ((qh->hw_info2 & __constant_cpu_to_le32(QH_SMASK)) != 0) { 940 if ((qh->hw_info2 & cpu_to_le32(QH_SMASK)) != 0) {
941 941
942 /* ... update hc-wide periodic stats (for usbfs) */ 942 /* ... update hc-wide periodic stats (for usbfs) */
943 oxu_to_hcd(oxu)->self.bandwidth_int_reqs--; 943 oxu_to_hcd(oxu)->self.bandwidth_int_reqs--;
@@ -981,7 +981,7 @@ static void unlink_async(struct oxu_hcd *oxu, struct ehci_qh *qh);
981static void intr_deschedule(struct oxu_hcd *oxu, struct ehci_qh *qh); 981static void intr_deschedule(struct oxu_hcd *oxu, struct ehci_qh *qh);
982static int qh_schedule(struct oxu_hcd *oxu, struct ehci_qh *qh); 982static int qh_schedule(struct oxu_hcd *oxu, struct ehci_qh *qh);
983 983
984#define HALT_BIT __constant_cpu_to_le32(QTD_STS_HALT) 984#define HALT_BIT cpu_to_le32(QTD_STS_HALT)
985 985
986/* Process and free completed qtds for a qh, returning URBs to drivers. 986/* Process and free completed qtds for a qh, returning URBs to drivers.
987 * Chases up to qh->hw_current. Returns number of completions called, 987 * Chases up to qh->hw_current. Returns number of completions called,
@@ -1160,7 +1160,7 @@ halt:
1160 /* should be rare for periodic transfers, 1160 /* should be rare for periodic transfers,
1161 * except maybe high bandwidth ... 1161 * except maybe high bandwidth ...
1162 */ 1162 */
1163 if ((__constant_cpu_to_le32(QH_SMASK) 1163 if ((cpu_to_le32(QH_SMASK)
1164 & qh->hw_info2) != 0) { 1164 & qh->hw_info2) != 0) {
1165 intr_deschedule(oxu, qh); 1165 intr_deschedule(oxu, qh);
1166 (void) qh_schedule(oxu, qh); 1166 (void) qh_schedule(oxu, qh);
@@ -1350,7 +1350,7 @@ static struct list_head *qh_urb_transaction(struct oxu_hcd *oxu,
1350 } 1350 }
1351 1351
1352 /* by default, enable interrupt on urb completion */ 1352 /* by default, enable interrupt on urb completion */
1353 qtd->hw_token |= __constant_cpu_to_le32(QTD_IOC); 1353 qtd->hw_token |= cpu_to_le32(QTD_IOC);
1354 return head; 1354 return head;
1355 1355
1356cleanup: 1356cleanup:
@@ -1539,7 +1539,7 @@ static void qh_link_async(struct oxu_hcd *oxu, struct ehci_qh *qh)
1539 /* qtd completions reported later by interrupt */ 1539 /* qtd completions reported later by interrupt */
1540} 1540}
1541 1541
1542#define QH_ADDR_MASK __constant_cpu_to_le32(0x7f) 1542#define QH_ADDR_MASK cpu_to_le32(0x7f)
1543 1543
1544/* 1544/*
1545 * For control/bulk/interrupt, return QH with these TDs appended. 1545 * For control/bulk/interrupt, return QH with these TDs appended.
@@ -2012,7 +2012,7 @@ static void qh_unlink_periodic(struct oxu_hcd *oxu, struct ehci_qh *qh)
2012 * and this qh is active in the current uframe 2012 * and this qh is active in the current uframe
2013 * (and overlay token SplitXstate is false?) 2013 * (and overlay token SplitXstate is false?)
2014 * THEN 2014 * THEN
2015 * qh->hw_info1 |= __constant_cpu_to_le32(1 << 7 "ignore"); 2015 * qh->hw_info1 |= cpu_to_le32(1 << 7 "ignore");
2016 */ 2016 */
2017 2017
2018 /* high bandwidth, or otherwise part of every microframe */ 2018 /* high bandwidth, or otherwise part of every microframe */
@@ -2057,7 +2057,7 @@ static void intr_deschedule(struct oxu_hcd *oxu, struct ehci_qh *qh)
2057 * active high speed queues may need bigger delays... 2057 * active high speed queues may need bigger delays...
2058 */ 2058 */
2059 if (list_empty(&qh->qtd_list) 2059 if (list_empty(&qh->qtd_list)
2060 || (__constant_cpu_to_le32(QH_CMASK) & qh->hw_info2) != 0) 2060 || (cpu_to_le32(QH_CMASK) & qh->hw_info2) != 0)
2061 wait = 2; 2061 wait = 2;
2062 else 2062 else
2063 wait = 55; /* worst case: 3 * 1024 */ 2063 wait = 55; /* worst case: 3 * 1024 */
@@ -2183,10 +2183,10 @@ static int qh_schedule(struct oxu_hcd *oxu, struct ehci_qh *qh)
2183 qh->start = frame; 2183 qh->start = frame;
2184 2184
2185 /* reset S-frame and (maybe) C-frame masks */ 2185 /* reset S-frame and (maybe) C-frame masks */
2186 qh->hw_info2 &= __constant_cpu_to_le32(~(QH_CMASK | QH_SMASK)); 2186 qh->hw_info2 &= cpu_to_le32(~(QH_CMASK | QH_SMASK));
2187 qh->hw_info2 |= qh->period 2187 qh->hw_info2 |= qh->period
2188 ? cpu_to_le32(1 << uframe) 2188 ? cpu_to_le32(1 << uframe)
2189 : __constant_cpu_to_le32(QH_SMASK); 2189 : cpu_to_le32(QH_SMASK);
2190 qh->hw_info2 |= c_mask; 2190 qh->hw_info2 |= c_mask;
2191 } else 2191 } else
2192 oxu_dbg(oxu, "reused qh %p schedule\n", qh); 2192 oxu_dbg(oxu, "reused qh %p schedule\n", qh);
diff --git a/drivers/usb/host/oxu210hp.h b/drivers/usb/host/oxu210hp.h
index 8910e271cc7d..1c216ad9aad2 100644
--- a/drivers/usb/host/oxu210hp.h
+++ b/drivers/usb/host/oxu210hp.h
@@ -235,21 +235,21 @@ struct ehci_qtd {
235} __attribute__ ((aligned(32))); 235} __attribute__ ((aligned(32)));
236 236
237/* mask NakCnt+T in qh->hw_alt_next */ 237/* mask NakCnt+T in qh->hw_alt_next */
238#define QTD_MASK __constant_cpu_to_le32 (~0x1f) 238#define QTD_MASK cpu_to_le32 (~0x1f)
239 239
240#define IS_SHORT_READ(token) (QTD_LENGTH(token) != 0 && QTD_PID(token) == 1) 240#define IS_SHORT_READ(token) (QTD_LENGTH(token) != 0 && QTD_PID(token) == 1)
241 241
242/* Type tag from {qh, itd, sitd, fstn}->hw_next */ 242/* Type tag from {qh, itd, sitd, fstn}->hw_next */
243#define Q_NEXT_TYPE(dma) ((dma) & __constant_cpu_to_le32 (3 << 1)) 243#define Q_NEXT_TYPE(dma) ((dma) & cpu_to_le32 (3 << 1))
244 244
245/* values for that type tag */ 245/* values for that type tag */
246#define Q_TYPE_QH __constant_cpu_to_le32 (1 << 1) 246#define Q_TYPE_QH cpu_to_le32 (1 << 1)
247 247
248/* next async queue entry, or pointer to interrupt/periodic QH */ 248/* next async queue entry, or pointer to interrupt/periodic QH */
249#define QH_NEXT(dma) (cpu_to_le32(((u32)dma)&~0x01f)|Q_TYPE_QH) 249#define QH_NEXT(dma) (cpu_to_le32(((u32)dma)&~0x01f)|Q_TYPE_QH)
250 250
251/* for periodic/async schedules and qtd lists, mark end of list */ 251/* for periodic/async schedules and qtd lists, mark end of list */
252#define EHCI_LIST_END __constant_cpu_to_le32(1) /* "null pointer" to hw */ 252#define EHCI_LIST_END cpu_to_le32(1) /* "null pointer" to hw */
253 253
254/* 254/*
255 * Entries in periodic shadow table are pointers to one of four kinds 255 * Entries in periodic shadow table are pointers to one of four kinds
diff --git a/drivers/usb/host/uhci-hcd.h b/drivers/usb/host/uhci-hcd.h
index 7d01c5677f92..26bd1b2bcbfc 100644
--- a/drivers/usb/host/uhci-hcd.h
+++ b/drivers/usb/host/uhci-hcd.h
@@ -73,11 +73,11 @@
73#define USBLEGSUP_RWC 0x8f00 /* the R/WC bits */ 73#define USBLEGSUP_RWC 0x8f00 /* the R/WC bits */
74#define USBLEGSUP_RO 0x5040 /* R/O and reserved bits */ 74#define USBLEGSUP_RO 0x5040 /* R/O and reserved bits */
75 75
76#define UHCI_PTR_BITS __constant_cpu_to_le32(0x000F) 76#define UHCI_PTR_BITS cpu_to_le32(0x000F)
77#define UHCI_PTR_TERM __constant_cpu_to_le32(0x0001) 77#define UHCI_PTR_TERM cpu_to_le32(0x0001)
78#define UHCI_PTR_QH __constant_cpu_to_le32(0x0002) 78#define UHCI_PTR_QH cpu_to_le32(0x0002)
79#define UHCI_PTR_DEPTH __constant_cpu_to_le32(0x0004) 79#define UHCI_PTR_DEPTH cpu_to_le32(0x0004)
80#define UHCI_PTR_BREADTH __constant_cpu_to_le32(0x0000) 80#define UHCI_PTR_BREADTH cpu_to_le32(0x0000)
81 81
82#define UHCI_NUMFRAMES 1024 /* in the frame list [array] */ 82#define UHCI_NUMFRAMES 1024 /* in the frame list [array] */
83#define UHCI_MAX_SOF_NUMBER 2047 /* in an SOF packet */ 83#define UHCI_MAX_SOF_NUMBER 2047 /* in an SOF packet */
diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c
index 5631d89c8730..58f873679145 100644
--- a/drivers/usb/host/uhci-q.c
+++ b/drivers/usb/host/uhci-q.c
@@ -402,7 +402,7 @@ static void uhci_fixup_toggles(struct uhci_qh *qh, int skip_first)
402 /* Otherwise all the toggles in the URB have to be switched */ 402 /* Otherwise all the toggles in the URB have to be switched */
403 } else { 403 } else {
404 list_for_each_entry(td, &urbp->td_list, list) { 404 list_for_each_entry(td, &urbp->td_list, list) {
405 td->token ^= __constant_cpu_to_le32( 405 td->token ^= cpu_to_le32(
406 TD_TOKEN_TOGGLE); 406 TD_TOKEN_TOGGLE);
407 toggle ^= 1; 407 toggle ^= 1;
408 } 408 }
@@ -883,7 +883,7 @@ static int uhci_submit_control(struct uhci_hcd *uhci, struct urb *urb,
883 883
884 uhci_fill_td(td, 0, USB_PID_OUT | uhci_explen(0), 0); 884 uhci_fill_td(td, 0, USB_PID_OUT | uhci_explen(0), 0);
885 wmb(); 885 wmb();
886 qh->dummy_td->status |= __constant_cpu_to_le32(TD_CTRL_ACTIVE); 886 qh->dummy_td->status |= cpu_to_le32(TD_CTRL_ACTIVE);
887 qh->dummy_td = td; 887 qh->dummy_td = td;
888 888
889 /* Low-speed transfers get a different queue, and won't hog the bus. 889 /* Low-speed transfers get a different queue, and won't hog the bus.
@@ -1003,7 +1003,7 @@ static int uhci_submit_common(struct uhci_hcd *uhci, struct urb *urb,
1003 * fast side but not enough to justify delaying an interrupt 1003 * fast side but not enough to justify delaying an interrupt
1004 * more than 2 or 3 URBs, so we will ignore the URB_NO_INTERRUPT 1004 * more than 2 or 3 URBs, so we will ignore the URB_NO_INTERRUPT
1005 * flag setting. */ 1005 * flag setting. */
1006 td->status |= __constant_cpu_to_le32(TD_CTRL_IOC); 1006 td->status |= cpu_to_le32(TD_CTRL_IOC);
1007 1007
1008 /* 1008 /*
1009 * Build the new dummy TD and activate the old one 1009 * Build the new dummy TD and activate the old one
@@ -1015,7 +1015,7 @@ static int uhci_submit_common(struct uhci_hcd *uhci, struct urb *urb,
1015 1015
1016 uhci_fill_td(td, 0, USB_PID_OUT | uhci_explen(0), 0); 1016 uhci_fill_td(td, 0, USB_PID_OUT | uhci_explen(0), 0);
1017 wmb(); 1017 wmb();
1018 qh->dummy_td->status |= __constant_cpu_to_le32(TD_CTRL_ACTIVE); 1018 qh->dummy_td->status |= cpu_to_le32(TD_CTRL_ACTIVE);
1019 qh->dummy_td = td; 1019 qh->dummy_td = td;
1020 1020
1021 usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe), 1021 usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe),
@@ -1317,7 +1317,7 @@ static int uhci_submit_isochronous(struct uhci_hcd *uhci, struct urb *urb,
1317 } 1317 }
1318 1318
1319 /* Set the interrupt-on-completion flag on the last packet. */ 1319 /* Set the interrupt-on-completion flag on the last packet. */
1320 td->status |= __constant_cpu_to_le32(TD_CTRL_IOC); 1320 td->status |= cpu_to_le32(TD_CTRL_IOC);
1321 1321
1322 /* Add the TDs to the frame list */ 1322 /* Add the TDs to the frame list */
1323 frame = urb->start_frame; 1323 frame = urb->start_frame;
diff --git a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c
index 972f20b3406c..eca355dccf65 100644
--- a/drivers/usb/image/mdc800.c
+++ b/drivers/usb/image/mdc800.c
@@ -188,7 +188,7 @@ static struct usb_endpoint_descriptor mdc800_ed [4] =
188 .bDescriptorType = 0, 188 .bDescriptorType = 0,
189 .bEndpointAddress = 0x01, 189 .bEndpointAddress = 0x01,
190 .bmAttributes = 0x02, 190 .bmAttributes = 0x02,
191 .wMaxPacketSize = __constant_cpu_to_le16(8), 191 .wMaxPacketSize = cpu_to_le16(8),
192 .bInterval = 0, 192 .bInterval = 0,
193 .bRefresh = 0, 193 .bRefresh = 0,
194 .bSynchAddress = 0, 194 .bSynchAddress = 0,
@@ -198,7 +198,7 @@ static struct usb_endpoint_descriptor mdc800_ed [4] =
198 .bDescriptorType = 0, 198 .bDescriptorType = 0,
199 .bEndpointAddress = 0x82, 199 .bEndpointAddress = 0x82,
200 .bmAttributes = 0x03, 200 .bmAttributes = 0x03,
201 .wMaxPacketSize = __constant_cpu_to_le16(8), 201 .wMaxPacketSize = cpu_to_le16(8),
202 .bInterval = 0, 202 .bInterval = 0,
203 .bRefresh = 0, 203 .bRefresh = 0,
204 .bSynchAddress = 0, 204 .bSynchAddress = 0,
@@ -208,7 +208,7 @@ static struct usb_endpoint_descriptor mdc800_ed [4] =
208 .bDescriptorType = 0, 208 .bDescriptorType = 0,
209 .bEndpointAddress = 0x03, 209 .bEndpointAddress = 0x03,
210 .bmAttributes = 0x02, 210 .bmAttributes = 0x02,
211 .wMaxPacketSize = __constant_cpu_to_le16(64), 211 .wMaxPacketSize = cpu_to_le16(64),
212 .bInterval = 0, 212 .bInterval = 0,
213 .bRefresh = 0, 213 .bRefresh = 0,
214 .bSynchAddress = 0, 214 .bSynchAddress = 0,
@@ -218,7 +218,7 @@ static struct usb_endpoint_descriptor mdc800_ed [4] =
218 .bDescriptorType = 0, 218 .bDescriptorType = 0,
219 .bEndpointAddress = 0x84, 219 .bEndpointAddress = 0x84,
220 .bmAttributes = 0x02, 220 .bmAttributes = 0x02,
221 .wMaxPacketSize = __constant_cpu_to_le16(64), 221 .wMaxPacketSize = cpu_to_le16(64),
222 .bInterval = 0, 222 .bInterval = 0,
223 .bRefresh = 0, 223 .bRefresh = 0,
224 .bSynchAddress = 0, 224 .bSynchAddress = 0,
diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c
index e0e9ce584175..bf677acc83db 100644
--- a/drivers/usb/musb/musb_virthub.c
+++ b/drivers/usb/musb/musb_virthub.c
@@ -285,7 +285,7 @@ int musb_hub_control(
285 desc->bDescLength = 9; 285 desc->bDescLength = 9;
286 desc->bDescriptorType = 0x29; 286 desc->bDescriptorType = 0x29;
287 desc->bNbrPorts = 1; 287 desc->bNbrPorts = 1;
288 desc->wHubCharacteristics = __constant_cpu_to_le16( 288 desc->wHubCharacteristics = cpu_to_le16(
289 0x0001 /* per-port power switching */ 289 0x0001 /* per-port power switching */
290 | 0x0010 /* no overcurrent reporting */ 290 | 0x0010 /* no overcurrent reporting */
291 ); 291 );