aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/f_uvc.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-07-10 14:03:20 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-02 15:43:15 -0400
commitbbafc0cb6c52c40647f561854db5fbac4d608186 (patch)
treed10c23e4e0a7ae5e169f7b7c627c6a762b0a2d56 /drivers/usb/gadget/f_uvc.c
parentc89f66f629f0e94806e3ec6f8f77b61a8feed39f (diff)
V4L/DVB: uvc: Move constants and structures definitions to linux/usb/video.h
The UVC host and gadget drivers both define constants and structures in private header files. Move all those definitions to linux/usb/video.h where they can be shared by the two drivers (and be available for userspace applications). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/usb/gadget/f_uvc.c')
-rw-r--r--drivers/usb/gadget/f_uvc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/usb/gadget/f_uvc.c b/drivers/usb/gadget/f_uvc.c
index dbe6db0184fd..be446b7e7eaa 100644
--- a/drivers/usb/gadget/f_uvc.c
+++ b/drivers/usb/gadget/f_uvc.c
@@ -61,12 +61,12 @@ static struct usb_gadget_strings *uvc_function_strings[] = {
61#define UVC_INTF_VIDEO_STREAMING 1 61#define UVC_INTF_VIDEO_STREAMING 1
62 62
63static struct usb_interface_assoc_descriptor uvc_iad __initdata = { 63static struct usb_interface_assoc_descriptor uvc_iad __initdata = {
64 .bLength = USB_DT_INTERFACE_ASSOCIATION_SIZE, 64 .bLength = sizeof(uvc_iad),
65 .bDescriptorType = USB_DT_INTERFACE_ASSOCIATION, 65 .bDescriptorType = USB_DT_INTERFACE_ASSOCIATION,
66 .bFirstInterface = 0, 66 .bFirstInterface = 0,
67 .bInterfaceCount = 2, 67 .bInterfaceCount = 2,
68 .bFunctionClass = USB_CLASS_VIDEO, 68 .bFunctionClass = USB_CLASS_VIDEO,
69 .bFunctionSubClass = 0x03, 69 .bFunctionSubClass = UVC_SC_VIDEO_INTERFACE_COLLECTION,
70 .bFunctionProtocol = 0x00, 70 .bFunctionProtocol = 0x00,
71 .iFunction = 0, 71 .iFunction = 0,
72}; 72};
@@ -78,7 +78,7 @@ static struct usb_interface_descriptor uvc_control_intf __initdata = {
78 .bAlternateSetting = 0, 78 .bAlternateSetting = 0,
79 .bNumEndpoints = 1, 79 .bNumEndpoints = 1,
80 .bInterfaceClass = USB_CLASS_VIDEO, 80 .bInterfaceClass = USB_CLASS_VIDEO,
81 .bInterfaceSubClass = 0x01, 81 .bInterfaceSubClass = UVC_SC_VIDEOCONTROL,
82 .bInterfaceProtocol = 0x00, 82 .bInterfaceProtocol = 0x00,
83 .iInterface = 0, 83 .iInterface = 0,
84}; 84};
@@ -106,7 +106,7 @@ static struct usb_interface_descriptor uvc_streaming_intf_alt0 __initdata = {
106 .bAlternateSetting = 0, 106 .bAlternateSetting = 0,
107 .bNumEndpoints = 0, 107 .bNumEndpoints = 0,
108 .bInterfaceClass = USB_CLASS_VIDEO, 108 .bInterfaceClass = USB_CLASS_VIDEO,
109 .bInterfaceSubClass = 0x02, 109 .bInterfaceSubClass = UVC_SC_VIDEOSTREAMING,
110 .bInterfaceProtocol = 0x00, 110 .bInterfaceProtocol = 0x00,
111 .iInterface = 0, 111 .iInterface = 0,
112}; 112};
@@ -118,7 +118,7 @@ static struct usb_interface_descriptor uvc_streaming_intf_alt1 __initdata = {
118 .bAlternateSetting = 1, 118 .bAlternateSetting = 1,
119 .bNumEndpoints = 1, 119 .bNumEndpoints = 1,
120 .bInterfaceClass = USB_CLASS_VIDEO, 120 .bInterfaceClass = USB_CLASS_VIDEO,
121 .bInterfaceSubClass = 0x02, 121 .bInterfaceSubClass = UVC_SC_VIDEOSTREAMING,
122 .bInterfaceProtocol = 0x00, 122 .bInterfaceProtocol = 0x00,
123 .iInterface = 0, 123 .iInterface = 0,
124}; 124};
@@ -603,15 +603,15 @@ uvc_bind_config(struct usb_configuration *c,
603 603
604 /* Validate the descriptors. */ 604 /* Validate the descriptors. */
605 if (control == NULL || control[0] == NULL || 605 if (control == NULL || control[0] == NULL ||
606 control[0]->bDescriptorSubType != UVC_DT_HEADER) 606 control[0]->bDescriptorSubType != UVC_VC_HEADER)
607 goto error; 607 goto error;
608 608
609 if (fs_streaming == NULL || fs_streaming[0] == NULL || 609 if (fs_streaming == NULL || fs_streaming[0] == NULL ||
610 fs_streaming[0]->bDescriptorSubType != UVC_DT_INPUT_HEADER) 610 fs_streaming[0]->bDescriptorSubType != UVC_VS_INPUT_HEADER)
611 goto error; 611 goto error;
612 612
613 if (hs_streaming == NULL || hs_streaming[0] == NULL || 613 if (hs_streaming == NULL || hs_streaming[0] == NULL ||
614 hs_streaming[0]->bDescriptorSubType != UVC_DT_INPUT_HEADER) 614 hs_streaming[0]->bDescriptorSubType != UVC_VS_INPUT_HEADER)
615 goto error; 615 goto error;
616 616
617 uvc->desc.control = control; 617 uvc->desc.control = control;