From patchwork Wed Aug 27 15:16:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Pietrasiewicz X-Patchwork-Id: 4788921 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C11D19F3B4 for ; Wed, 27 Aug 2014 15:18:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AD5BC20117 for ; Wed, 27 Aug 2014 15:18:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D119B20127 for ; Wed, 27 Aug 2014 15:18:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935066AbaH0PSB (ORCPT ); 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 ); 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 To: linux-usb@vger.kernel.org, linux-media@vger.kernel.org Cc: Andrzej Pietrasiewicz , Felipe Balbi , Greg Kroah-Hartman , Marek Szyprowski , Laurent Pinchart 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: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Andrzej Pietrasiewicz --- 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;