usb: gadget: uvc: cleanup UVCG_FRAME_ATTR macro
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 14 Jan 2015 21:06:35 +0000 (00:06 +0300)
committerFelipe Balbi <balbi@ti.com>
Mon, 19 Jan 2015 18:53:31 +0000 (12:53 -0600)
commit3c4c733ca9e3f88e3107b6e23b9789bf7769e1f4
tree611b1f06e887d87bcbd2e35a4b11b1392a9bb957
parentc5b2dc68a7a7e31d8e88b3bf9d45bd9e78e9fb78
usb: gadget: uvc: cleanup UVCG_FRAME_ATTR macro

1) Change "conv" an "vnoc" to "to_cpu_endian" to "to_little_endian".
2) No need to check the "limit" because that is already handled in
   kstrtoXX so delete that parameter along with the check.
3) By using a "bits" parameter, we can combine the "uxx" parameter and
   the "str2u" parameters.
4) The kstrtou##bits() conversion does not need to be done under the
   mutex so move it to the start of the function.
5) Change the name of "identity_conv" to "noop_conversion".

Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/function/uvc_configfs.c