usb: gadget: uvc: configfs: Simplify attributes macros
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 18 Sep 2018 12:04:16 +0000 (15:04 +0300)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 25 Sep 2018 15:48:09 +0000 (18:48 +0300)
commit4f2a6552c2888b317984e64b292f0f1ca1832d44
tree47688121cbf4ce61878b06a2ae3067f39f76d679
parent78c9e7ce00c3fabf5c6dd3a6eab3a3dcf21dd213
usb: gadget: uvc: configfs: Simplify attributes macros

Several macros used to define attributes and their access functions take
multiple arguments to specify endianness and string conversion
functions, based on the size of the attribute. This can be simplified by
passing the number of bits explicitly, and constructing the name of the
functions internally.

The UVCG_OPTS_ATTR macro can be simplified further as all fields it
deals with are unsigned int.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Tested-by: Paul Elder <paul.elder@ideasonboard.com>
drivers/usb/gadget/function/uvc_configfs.c