diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2013-03-01 14:46:24 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-03-18 05:18:18 -0400 |
commit | ee6a4d870b722a57aa57abe7f12539bac9c01555 (patch) | |
tree | 17b530c9075bfe10bc866d636d616d5abd0d4298 /drivers/usb/gadget/f_uvc.c | |
parent | 912ca429fc87ceb63ae9ae00eff08212aad890c5 (diff) |
usb: gadget: uvc: Fix coding style issues introduced by SS support
Let's keep the code consistent, people might want to read it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Bhupesh Sharma <bhupesh.sharma@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/f_uvc.c')
-rw-r--r-- | drivers/usb/gadget/f_uvc.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/drivers/usb/gadget/f_uvc.c b/drivers/usb/gadget/f_uvc.c index 1851490c67cd..c13b8b07c791 100644 --- a/drivers/usb/gadget/f_uvc.c +++ b/drivers/usb/gadget/f_uvc.c | |||
@@ -164,43 +164,43 @@ static struct usb_endpoint_descriptor uvc_hs_streaming_ep = { | |||
164 | 164 | ||
165 | /* super speed support */ | 165 | /* super speed support */ |
166 | static struct usb_endpoint_descriptor uvc_ss_control_ep __initdata = { | 166 | static struct usb_endpoint_descriptor uvc_ss_control_ep __initdata = { |
167 | .bLength = USB_DT_ENDPOINT_SIZE, | 167 | .bLength = USB_DT_ENDPOINT_SIZE, |
168 | .bDescriptorType = USB_DT_ENDPOINT, | 168 | .bDescriptorType = USB_DT_ENDPOINT, |
169 | 169 | ||
170 | .bEndpointAddress = USB_DIR_IN, | 170 | .bEndpointAddress = USB_DIR_IN, |
171 | .bmAttributes = USB_ENDPOINT_XFER_INT, | 171 | .bmAttributes = USB_ENDPOINT_XFER_INT, |
172 | .wMaxPacketSize = cpu_to_le16(UVC_STATUS_MAX_PACKET_SIZE), | 172 | .wMaxPacketSize = cpu_to_le16(UVC_STATUS_MAX_PACKET_SIZE), |
173 | .bInterval = 8, | 173 | .bInterval = 8, |
174 | }; | 174 | }; |
175 | 175 | ||
176 | static struct usb_ss_ep_comp_descriptor uvc_ss_control_comp __initdata = { | 176 | static struct usb_ss_ep_comp_descriptor uvc_ss_control_comp __initdata = { |
177 | .bLength = sizeof uvc_ss_control_comp, | 177 | .bLength = sizeof(uvc_ss_control_comp), |
178 | .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, | 178 | .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, |
179 | 179 | ||
180 | /* the following 3 values can be tweaked if necessary */ | 180 | /* the following 3 values can be tweaked if necessary */ |
181 | /* .bMaxBurst = 0, */ | 181 | .bMaxBurst = 0, |
182 | /* .bmAttributes = 0, */ | 182 | .bmAttributes = 0, |
183 | .wBytesPerInterval = cpu_to_le16(UVC_STATUS_MAX_PACKET_SIZE), | 183 | .wBytesPerInterval = cpu_to_le16(UVC_STATUS_MAX_PACKET_SIZE), |
184 | }; | 184 | }; |
185 | 185 | ||
186 | static struct usb_endpoint_descriptor uvc_ss_streaming_ep __initdata = { | 186 | static struct usb_endpoint_descriptor uvc_ss_streaming_ep __initdata = { |
187 | .bLength = USB_DT_ENDPOINT_SIZE, | 187 | .bLength = USB_DT_ENDPOINT_SIZE, |
188 | .bDescriptorType = USB_DT_ENDPOINT, | 188 | .bDescriptorType = USB_DT_ENDPOINT, |
189 | 189 | ||
190 | .bEndpointAddress = USB_DIR_IN, | 190 | .bEndpointAddress = USB_DIR_IN, |
191 | .bmAttributes = USB_ENDPOINT_XFER_ISOC, | 191 | .bmAttributes = USB_ENDPOINT_XFER_ISOC, |
192 | .wMaxPacketSize = cpu_to_le16(1024), | 192 | .wMaxPacketSize = cpu_to_le16(1024), |
193 | .bInterval = 4, | 193 | .bInterval = 4, |
194 | }; | 194 | }; |
195 | 195 | ||
196 | static struct usb_ss_ep_comp_descriptor uvc_ss_streaming_comp = { | 196 | static struct usb_ss_ep_comp_descriptor uvc_ss_streaming_comp = { |
197 | .bLength = sizeof uvc_ss_streaming_comp, | 197 | .bLength = sizeof(uvc_ss_streaming_comp), |
198 | .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, | 198 | .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, |
199 | 199 | ||
200 | /* the following 3 values can be tweaked if necessary */ | 200 | /* the following 3 values can be tweaked if necessary */ |
201 | .bMaxBurst = 0, | 201 | .bMaxBurst = 0, |
202 | .bmAttributes = 0, | 202 | .bmAttributes = 0, |
203 | .wBytesPerInterval = cpu_to_le16(1024), | 203 | .wBytesPerInterval = cpu_to_le16(1024), |
204 | }; | 204 | }; |
205 | 205 | ||
206 | static const struct usb_descriptor_header * const uvc_fs_streaming[] = { | 206 | static const struct usb_descriptor_header * const uvc_fs_streaming[] = { |
@@ -514,13 +514,13 @@ uvc_copy_descriptors(struct uvc_device *uvc, enum usb_device_speed speed) | |||
514 | } | 514 | } |
515 | 515 | ||
516 | for (src = (const struct usb_descriptor_header **)uvc_control_desc; | 516 | for (src = (const struct usb_descriptor_header **)uvc_control_desc; |
517 | *src; ++src) { | 517 | *src; ++src) { |
518 | control_size += (*src)->bLength; | 518 | control_size += (*src)->bLength; |
519 | bytes += (*src)->bLength; | 519 | bytes += (*src)->bLength; |
520 | n_desc++; | 520 | n_desc++; |
521 | } | 521 | } |
522 | for (src = (const struct usb_descriptor_header **)uvc_streaming_cls; | 522 | for (src = (const struct usb_descriptor_header **)uvc_streaming_cls; |
523 | *src; ++src) { | 523 | *src; ++src) { |
524 | streaming_size += (*src)->bLength; | 524 | streaming_size += (*src)->bLength; |
525 | bytes += (*src)->bLength; | 525 | bytes += (*src)->bLength; |
526 | n_desc++; | 526 | n_desc++; |
@@ -775,23 +775,23 @@ uvc_bind_config(struct usb_configuration *c, | |||
775 | 775 | ||
776 | /* Validate the descriptors. */ | 776 | /* Validate the descriptors. */ |
777 | if (fs_control == NULL || fs_control[0] == NULL || | 777 | if (fs_control == NULL || fs_control[0] == NULL || |
778 | fs_control[0]->bDescriptorSubType != UVC_VC_HEADER) | 778 | fs_control[0]->bDescriptorSubType != UVC_VC_HEADER) |
779 | goto error; | 779 | goto error; |
780 | 780 | ||
781 | if (ss_control == NULL || ss_control[0] == NULL || | 781 | if (ss_control == NULL || ss_control[0] == NULL || |
782 | ss_control[0]->bDescriptorSubType != UVC_VC_HEADER) | 782 | ss_control[0]->bDescriptorSubType != UVC_VC_HEADER) |
783 | goto error; | 783 | goto error; |
784 | 784 | ||
785 | if (fs_streaming == NULL || fs_streaming[0] == NULL || | 785 | if (fs_streaming == NULL || fs_streaming[0] == NULL || |
786 | fs_streaming[0]->bDescriptorSubType != UVC_VS_INPUT_HEADER) | 786 | fs_streaming[0]->bDescriptorSubType != UVC_VS_INPUT_HEADER) |
787 | goto error; | 787 | goto error; |
788 | 788 | ||
789 | if (hs_streaming == NULL || hs_streaming[0] == NULL || | 789 | if (hs_streaming == NULL || hs_streaming[0] == NULL || |
790 | hs_streaming[0]->bDescriptorSubType != UVC_VS_INPUT_HEADER) | 790 | hs_streaming[0]->bDescriptorSubType != UVC_VS_INPUT_HEADER) |
791 | goto error; | 791 | goto error; |
792 | 792 | ||
793 | if (ss_streaming == NULL || ss_streaming[0] == NULL || | 793 | if (ss_streaming == NULL || ss_streaming[0] == NULL || |
794 | ss_streaming[0]->bDescriptorSubType != UVC_VS_INPUT_HEADER) | 794 | ss_streaming[0]->bDescriptorSubType != UVC_VS_INPUT_HEADER) |
795 | goto error; | 795 | goto error; |
796 | 796 | ||
797 | uvc->desc.fs_control = fs_control; | 797 | uvc->desc.fs_control = fs_control; |