configfs: Refactor ConfigFS parsing code
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sat, 26 May 2018 17:58:19 +0000 (20:58 +0300)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 1 Jun 2018 06:47:11 +0000 (09:47 +0300)
commit571e148aaec20c26c308d6611cdb1f34ec81ff1e
tree2d829def0ed54aaf55dddd4743c0e9bbb6dec112
parent203acba635874681e3e744fbce4151d569afa572
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>
configfs.c
configfs.h
uvc-gadget.c