* [PATCH] usb: gadget: uvc: Missing files for configfs interface
@ 2018-02-09 19:23 ` Bin Liu
0 siblings, 0 replies; 6+ messages in thread
From: Bin Liu @ 2018-02-09 19:23 UTC (permalink / raw)
To: stable; +Cc: linux-usb, Felipe Balbi, Petr Cvek, Bin Liu
From: Petr Cvek <petr.cvek@tul.cz>
commit c8cd751060b149997b9de53a494fb1490ded72c5 upstream.
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>
Signed-off-by: Bin Liu <b-liu@ti.com>
---
drivers/usb/gadget/function/uvc_configfs.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c
index ad8c9b05572d..01656f1c6d65 100644
--- a/drivers/usb/gadget/function/uvc_configfs.c
+++ b/drivers/usb/gadget/function/uvc_configfs.c
@@ -2202,7 +2202,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) \
{ \
@@ -2245,16 +2245,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
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* usb: gadget: uvc: Missing files for configfs interface
@ 2018-02-09 19:23 ` Bin Liu
0 siblings, 0 replies; 6+ messages in thread
From: Bin Liu @ 2018-02-09 19:23 UTC (permalink / raw)
To: stable; +Cc: linux-usb, Felipe Balbi, Petr Cvek, Bin Liu
From: Petr Cvek <petr.cvek@tul.cz>
commit c8cd751060b149997b9de53a494fb1490ded72c5 upstream.
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>
Signed-off-by: Bin Liu <b-liu@ti.com>
---
drivers/usb/gadget/function/uvc_configfs.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c
index ad8c9b05572d..01656f1c6d65 100644
--- a/drivers/usb/gadget/function/uvc_configfs.c
+++ b/drivers/usb/gadget/function/uvc_configfs.c
@@ -2202,7 +2202,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) \
{ \
@@ -2245,16 +2245,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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] usb: gadget: uvc: Missing files for configfs interface
@ 2018-02-09 19:51 ` Greg Kroah-Hartman
0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2018-02-09 19:51 UTC (permalink / raw)
To: Bin Liu; +Cc: stable, linux-usb, Felipe Balbi, Petr Cvek
On Fri, Feb 09, 2018 at 01:23:43PM -0600, Bin Liu wrote:
> From: Petr Cvek <petr.cvek@tul.cz>
>
> commit c8cd751060b149997b9de53a494fb1490ded72c5 upstream.
>
> 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>
> Signed-off-by: Bin Liu <b-liu@ti.com>
> ---
> drivers/usb/gadget/function/uvc_configfs.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
What stable kernel(s) do you want this applied to?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* usb: gadget: uvc: Missing files for configfs interface
@ 2018-02-09 19:51 ` Greg Kroah-Hartman
0 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2018-02-09 19:51 UTC (permalink / raw)
To: Bin Liu; +Cc: stable, linux-usb, Felipe Balbi, Petr Cvek
On Fri, Feb 09, 2018 at 01:23:43PM -0600, Bin Liu wrote:
> From: Petr Cvek <petr.cvek@tul.cz>
>
> commit c8cd751060b149997b9de53a494fb1490ded72c5 upstream.
>
> 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>
> Signed-off-by: Bin Liu <b-liu@ti.com>
> ---
> drivers/usb/gadget/function/uvc_configfs.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
What stable kernel(s) do you want this applied to?
thanks,
greg k-h
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] usb: gadget: uvc: Missing files for configfs interface
@ 2018-02-09 20:02 ` Bin Liu
0 siblings, 0 replies; 6+ messages in thread
From: Bin Liu @ 2018-02-09 20:02 UTC (permalink / raw)
To: Greg KH; +Cc: stable, linux-usb, Felipe Balbi, Petr Cvek
On Fri, Feb 09, 2018 at 08:51:03PM +0100, Greg KH wrote:
> On Fri, Feb 09, 2018 at 01:23:43PM -0600, Bin Liu wrote:
> > From: Petr Cvek <petr.cvek@tul.cz>
> >
> > commit c8cd751060b149997b9de53a494fb1490ded72c5 upstream.
> >
> > 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>
> > Signed-off-by: Bin Liu <b-liu@ti.com>
> > ---
> > drivers/usb/gadget/function/uvc_configfs.c | 16 ++++++++--------
> > 1 file changed, 8 insertions(+), 8 deletions(-)
>
> What stable kernel(s) do you want this applied to?
The commit 76e0da34c7ce which causes the regression is introduced in
v4.4, so I would think this patch have to be applied down to v4.4.
FYI, I tested this patch on v4.4 and v4.9.
Thanks,
-Bin.
^ permalink raw reply [flat|nested] 6+ messages in thread
* usb: gadget: uvc: Missing files for configfs interface
@ 2018-02-09 20:02 ` Bin Liu
0 siblings, 0 replies; 6+ messages in thread
From: Bin Liu @ 2018-02-09 20:02 UTC (permalink / raw)
To: Greg KH; +Cc: stable, linux-usb, Felipe Balbi, Petr Cvek
On Fri, Feb 09, 2018 at 08:51:03PM +0100, Greg KH wrote:
> On Fri, Feb 09, 2018 at 01:23:43PM -0600, Bin Liu wrote:
> > From: Petr Cvek <petr.cvek@tul.cz>
> >
> > commit c8cd751060b149997b9de53a494fb1490ded72c5 upstream.
> >
> > 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>
> > Signed-off-by: Bin Liu <b-liu@ti.com>
> > ---
> > drivers/usb/gadget/function/uvc_configfs.c | 16 ++++++++--------
> > 1 file changed, 8 insertions(+), 8 deletions(-)
>
> What stable kernel(s) do you want this applied to?
The commit 76e0da34c7ce which causes the regression is introduced in
v4.4, so I would think this patch have to be applied down to v4.4.
FYI, I tested this patch on v4.4 and v4.9.
Thanks,
-Bin.
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-02-09 20:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-09 19:23 [PATCH] usb: gadget: uvc: Missing files for configfs interface Bin Liu
2018-02-09 19:23 ` Bin Liu
2018-02-09 19:51 ` [PATCH] " Greg KH
2018-02-09 19:51 ` Greg Kroah-Hartman
2018-02-09 20:02 ` [PATCH] " Bin Liu
2018-02-09 20:02 ` Bin Liu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.