diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2018-05-26 20:58:19 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2018-06-01 09:47:11 +0300 |
commit | 571e148aaec20c26c308d6611cdb1f34ec81ff1e (patch) | |
tree | 2d829def0ed54aaf55dddd4743c0e9bbb6dec112 /uvc-gadget.c | |
parent | 203acba635874681e3e744fbce4151d569afa572 (diff) |
configfs: Refactor ConfigFS parsing code
Move all attribute parsing to a top-level configfs_parse_uvc() function,
and split control and streaming interface attributes to two separate
helper functions. In addition to making the code more structured, it
will also allow supporting multiple streaming interfaces in a single UVC
function in the future.
The uvc_function_config structure is similarly reorganized in a
hierarchical representation of the configuration.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'uvc-gadget.c')
-rw-r--r-- | uvc-gadget.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/uvc-gadget.c b/uvc-gadget.c index 96f9996..57dc097 100644 --- a/uvc-gadget.c +++ b/uvc-gadget.c @@ -414,9 +414,9 @@ uvc_events_process_class(struct uvc_device *dev, if ((ctrl->bRequestType & USB_RECIP_MASK) != USB_RECIP_INTERFACE) return; - if (interface == dev->fc->control_interface) + if (interface == dev->fc->control.intf.bInterfaceNumber) uvc_events_process_control(dev, ctrl->bRequest, ctrl->wValue >> 8, resp); - else if (interface == dev->fc->streaming_interface) + else if (interface == dev->fc->streaming.intf.bInterfaceNumber) uvc_events_process_streaming(dev, ctrl->bRequest, ctrl->wValue >> 8, resp); } |