All of lore.kernel.org
 help / color / mirror / Atom feed
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	[thread overview]
Message-ID: <1409152598-21046-1-git-send-email-andrzej.p@samsung.com> (raw)
In-Reply-To: <1408381577-31901-3-git-send-email-laurent.pinchart@ideasonboard.com>

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;
 	strlcpy(video->name, cdev->gadget->name, sizeof(video->name));
 
 	uvc->vdev = video;
-- 
1.9.1


  parent reply	other threads:[~2014-08-27 15:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-18 17:06 [PATCH 0/2] Move UVC gagdet to video_ioctl2 Laurent Pinchart
2014-08-18 17:06 ` [PATCH 1/2] usb: gadget: f_uvc: Store EP0 control request state during setup stage Laurent Pinchart
2014-08-18 17:06 ` [PATCH 2/2] usb: gadget: f_uvc: Move to video_ioctl2 Laurent Pinchart
2014-08-18 18:24   ` Hans Verkuil
2014-08-18 21:16     ` Laurent Pinchart
2014-08-20  7:55       ` Michael Grzeschik
2014-08-20 17:04         ` Laurent Pinchart
2014-08-27 15:16   ` Andrzej Pietrasiewicz [this message]
2014-08-28 11:28     ` [PATCH] usb: gadget: f_uvc fix transition " Laurent Pinchart
2014-08-28 14:39       ` Andrzej Pietrasiewicz
2014-08-28 14:48         ` Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1409152598-21046-1-git-send-email-andrzej.p@samsung.com \
    --to=andrzej.p@samsung.com \
    --cc=balbi@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.