aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/file_storage.c
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/gadget/file_storage.c
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/gadget/file_storage.c')
-rw-r--r--drivers/usb/gadget/file_storage.c22
1 files changed, 11 insertions, 11 deletions
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,