Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: gadget: uvc: Missing files for configfs interface

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>

authored by

Petr Cvek and committed by
Felipe Balbi
c8cd7510 a38b3955

+8 -8
+8 -8
drivers/usb/gadget/function/uvc_configfs.c
··· 2125 2125 .release = uvc_attr_release, 2126 2126 }; 2127 2127 2128 - #define UVCG_OPTS_ATTR(cname, conv, str2u, uxx, vnoc, limit) \ 2128 + #define UVCG_OPTS_ATTR(cname, aname, conv, str2u, uxx, vnoc, limit) \ 2129 2129 static ssize_t f_uvc_opts_##cname##_show( \ 2130 2130 struct config_item *item, char *page) \ 2131 2131 { \ ··· 2168 2168 return ret; \ 2169 2169 } \ 2170 2170 \ 2171 - UVC_ATTR(f_uvc_opts_, cname, aname) 2171 + UVC_ATTR(f_uvc_opts_, cname, cname) 2172 2172 2173 2173 #define identity_conv(x) (x) 2174 2174 2175 - UVCG_OPTS_ATTR(streaming_interval, identity_conv, kstrtou8, u8, identity_conv, 2176 - 16); 2177 - UVCG_OPTS_ATTR(streaming_maxpacket, le16_to_cpu, kstrtou16, u16, le16_to_cpu, 2178 - 3072); 2179 - UVCG_OPTS_ATTR(streaming_maxburst, identity_conv, kstrtou8, u8, identity_conv, 2180 - 15); 2175 + UVCG_OPTS_ATTR(streaming_interval, streaming_interval, identity_conv, 2176 + kstrtou8, u8, identity_conv, 16); 2177 + UVCG_OPTS_ATTR(streaming_maxpacket, streaming_maxpacket, le16_to_cpu, 2178 + kstrtou16, u16, le16_to_cpu, 3072); 2179 + UVCG_OPTS_ATTR(streaming_maxburst, streaming_maxburst, identity_conv, 2180 + kstrtou8, u8, identity_conv, 15); 2181 2181 2182 2182 #undef identity_conv 2183 2183