Message ID | 1409152598-21046-1-git-send-email-andrzej.p@samsung.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from <linux-media-owner@vger.kernel.org>) id 1XMeza-0001ka-LN; Wed, 27 Aug 2014 17:18:34 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.72/mailfrontend-8) with esmtp id 1XMezX-0005n3-mG; Wed, 27 Aug 2014 17:18:34 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935066AbaH0PSB (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Wed, 27 Aug 2014 11:18:01 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:42643 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933913AbaH0PRr (ORCPT <rfc822;linux-media@vger.kernel.org>); Wed, 27 Aug 2014 11:17:47 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NAZ0016S1AG7S50@mailout1.w1.samsung.com>; Wed, 27 Aug 2014 16:20:40 +0100 (BST) X-AuditID: cbfec7f5-b7f776d000003e54-ec-53fdf698aa9d Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 05.6A.15956.896FDF35; Wed, 27 Aug 2014 16:17:44 +0100 (BST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NAZ007PA15EYK30@eusync2.samsung.com>; Wed, 27 Aug 2014 16:17:44 +0100 (BST) From: Andrzej Pietrasiewicz <andrzej.p@samsung.com> To: linux-usb@vger.kernel.org, linux-media@vger.kernel.org Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.com>, Felipe Balbi <balbi@ti.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Marek Szyprowski <m.szyprowski@samsung.com>, Laurent Pinchart <laurent.pinchart@ideasonboard.com> Subject: [PATCH] usb: gadget: f_uvc fix transition to video_ioctl2 Date: Wed, 27 Aug 2014 17:16:38 +0200 Message-id: <1409152598-21046-1-git-send-email-andrzej.p@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1408381577-31901-3-git-send-email-laurent.pinchart@ideasonboard.com> References: <1408381577-31901-3-git-send-email-laurent.pinchart@ideasonboard.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrIJMWRmVeSWpSXmKPExsVy+t/xK7ozvv0NNvixV95i1st2FouD9+st mhevZ7PonLiE3aJnw1ZWi0XLWpkt1h65y+7A7jG7Yyarx/65a9g9+rasYvQ4fmM7k8fnTXIB rFFcNimpOZllqUX6dglcGa8uvGAsaGavWPZ7HnsD43/WLkYODgkBE4mOTtMuRk4gU0ziwr31 bF2MXBxCAksZJa5PPcYO4fQzSaxeepAJpIpNwFhi78EORhBbRMBKYuGhV2BFzAIvGCUuzLgE ViQs4CTx9fddFpANLAKqEld77UHCvAKuErv7frNBbFOU6H42Achm5+AUCJE46QlSLCQQLHHm rsAERt4FjAyrGEVTS5MLipPSc430ihNzi0vz0vWS83M3MUKC6esOxqXHrA4xCnAwKvHwKpz+ EyzEmlhWXJl7iFGCg1lJhLfswN9gId6UxMqq1KL8+KLSnNTiQ4xMHJxSDYzrXgqlnrCPEjOJ uHq4/P2GZMUX3ZMXbDa8yBjPeKuEqYDrY+/GO8Gh+158n1b9/66O0dJCTnVT1W0LbzvJhQjU c+6yE6nxFm5dva0l58Du9T2nZ/nH/t1fxv7quuliZTPPBfYyJuKz8yImnbOq+ZIQ827u+pDJ lgzRqy5E8h5cIrPqyJSHhwWVWIozEg21mIuKEwHcY0YkBAIAAA== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2014.8.27.150918 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1000_1099 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' |
Commit Message
Andrzej Pietrasiewicz
Aug. 27, 2014, 3:16 p.m. UTC
UVC video node is a TX device from the point of view of the gadget,
so we cannot rely on the video struct being filled with zeros, because
VFL_DIR_TX is actually 1.
Suggested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
---
drivers/usb/gadget/function/f_uvc.c | 1 +
1 file changed, 1 insertion(+)
Comments
Hi Andrzej, Thank you for the patch. On Wednesday 27 August 2014 17:16:38 Andrzej Pietrasiewicz wrote: > UVC video node is a TX device from the point of view of the gadget, > so we cannot rely on the video struct being filled with zeros, because > VFL_DIR_TX is actually 1. > > Suggested-by: Sylwester Nawrocki <s.nawrocki@samsung.com> > Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> > --- > drivers/usb/gadget/function/f_uvc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/usb/gadget/function/f_uvc.c > b/drivers/usb/gadget/function/f_uvc.c index 5209105..95dc1c6 100644 > --- a/drivers/usb/gadget/function/f_uvc.c > +++ b/drivers/usb/gadget/function/f_uvc.c > @@ -411,6 +411,7 @@ uvc_register_video(struct uvc_device *uvc) > video->fops = &uvc_v4l2_fops; > video->ioctl_ops = &uvc_v4l2_ioctl_ops; > video->release = video_device_release; > + video->vfl_dir = VFL_DIR_TX; Do you have any objection against squashing this patch into "usb: gadget: f_uvc: Move to video_ioctl2" ? > strlcpy(video->name, cdev->gadget->name, sizeof(video->name)); > > uvc->vdev = video;
W dniu 28.08.2014 o 13:28, Laurent Pinchart pisze: <snip> >> diff --git a/drivers/usb/gadget/function/f_uvc.c >> b/drivers/usb/gadget/function/f_uvc.c index 5209105..95dc1c6 100644 >> --- a/drivers/usb/gadget/function/f_uvc.c >> +++ b/drivers/usb/gadget/function/f_uvc.c >> @@ -411,6 +411,7 @@ uvc_register_video(struct uvc_device *uvc) >> video->fops = &uvc_v4l2_fops; >> video->ioctl_ops = &uvc_v4l2_ioctl_ops; >> video->release = video_device_release; >> + video->vfl_dir = VFL_DIR_TX; > > Do you have any objection against squashing this patch into "usb: gadget: > f_uvc: Move to video_ioctl2" ? > Not at all. Feel free to squash it. AP -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Aug 28, 2014 at 04:39:27PM +0200, Andrzej Pietrasiewicz wrote: > W dniu 28.08.2014 o 13:28, Laurent Pinchart pisze: > > <snip> > > >>diff --git a/drivers/usb/gadget/function/f_uvc.c > >>b/drivers/usb/gadget/function/f_uvc.c index 5209105..95dc1c6 100644 > >>--- a/drivers/usb/gadget/function/f_uvc.c > >>+++ b/drivers/usb/gadget/function/f_uvc.c > >>@@ -411,6 +411,7 @@ uvc_register_video(struct uvc_device *uvc) > >> video->fops = &uvc_v4l2_fops; > >> video->ioctl_ops = &uvc_v4l2_ioctl_ops; > >> video->release = video_device_release; > >>+ video->vfl_dir = VFL_DIR_TX; > > > >Do you have any objection against squashing this patch into "usb: gadget: > >f_uvc: Move to video_ioctl2" ? > > > Not at all. Feel free to squash it. This is in my testing/fixes, though. I'll drop it from there.
diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c index 5209105..95dc1c6 100644 --- a/drivers/usb/gadget/function/f_uvc.c +++ b/drivers/usb/gadget/function/f_uvc.c @@ -411,6 +411,7 @@ uvc_register_video(struct uvc_device *uvc) video->fops = &uvc_v4l2_fops; video->ioctl_ops = &uvc_v4l2_ioctl_ops; video->release = video_device_release; + video->vfl_dir = VFL_DIR_TX; strlcpy(video->name, cdev->gadget->name, sizeof(video->name)); uvc->vdev = video;