]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
usb: gadget: uvc: Missing files for configfs interface
authorPetr Cvek <petr.cvek@tul.cz>
Mon, 6 Mar 2017 23:57:20 +0000 (00:57 +0100)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 11 Apr 2017 07:57:59 +0000 (10:57 +0300)
Commit 76e0da34c7ce ("usb-gadget/uvc: use per-attribute show and store
methods") caused a stringification of an undefined macro argument "aname",
so three UVC parameters (streaming_interval, streaming_maxpacket and
streaming_maxburst) were named "aname".

Add the definition of "aname" to the main macro and name the filenames as
originaly intended.

Signed-off-by: Petr Cvek <petr.cvek@tul.cz>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/function/uvc_configfs.c

index 4e037d2a7a60c3eefdd9f6585def29b23c02984b..844cb738bafd00537b567038301beb7f5850f034 100644 (file)
@@ -2125,7 +2125,7 @@ static struct configfs_item_operations uvc_item_ops = {
        .release                = uvc_attr_release,
 };
 
-#define UVCG_OPTS_ATTR(cname, conv, str2u, uxx, vnoc, limit)           \
+#define UVCG_OPTS_ATTR(cname, aname, conv, str2u, uxx, vnoc, limit)    \
 static ssize_t f_uvc_opts_##cname##_show(                              \
        struct config_item *item, char *page)                           \
 {                                                                      \
@@ -2168,16 +2168,16 @@ end:                                                                    \
        return ret;                                                     \
 }                                                                      \
                                                                        \
-UVC_ATTR(f_uvc_opts_, cname, aname)
+UVC_ATTR(f_uvc_opts_, cname, cname)
 
 #define identity_conv(x) (x)
 
-UVCG_OPTS_ATTR(streaming_interval, identity_conv, kstrtou8, u8, identity_conv,
-              16);
-UVCG_OPTS_ATTR(streaming_maxpacket, le16_to_cpu, kstrtou16, u16, le16_to_cpu,
-              3072);
-UVCG_OPTS_ATTR(streaming_maxburst, identity_conv, kstrtou8, u8, identity_conv,
-              15);
+UVCG_OPTS_ATTR(streaming_interval, streaming_interval, identity_conv,
+              kstrtou8, u8, identity_conv, 16);
+UVCG_OPTS_ATTR(streaming_maxpacket, streaming_maxpacket, le16_to_cpu,
+              kstrtou16, u16, le16_to_cpu, 3072);
+UVCG_OPTS_ATTR(streaming_maxburst, streaming_maxburst, identity_conv,
+              kstrtou8, u8, identity_conv, 15);
 
 #undef identity_conv