From patchwork Wed Sep 11 10:17:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacek Anaszewski X-Patchwork-Id: 2871981 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 60548BF43F for ; Wed, 11 Sep 2013 10:18:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 925AD2027F for ; Wed, 11 Sep 2013 10:18:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1B34E20222 for ; Wed, 11 Sep 2013 10:18:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753547Ab3IKKSB (ORCPT ); Wed, 11 Sep 2013 06:18:01 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:28334 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753371Ab3IKKR6 (ORCPT ); Wed, 11 Sep 2013 06:17:58 -0400 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MSY001S4HXTJUL0@mailout3.samsung.com> for linux-media@vger.kernel.org; Wed, 11 Sep 2013 19:17:57 +0900 (KST) X-AuditID: cbfee61b-b7f776d0000016c8-fe-523043553cca Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 55.B1.05832.55340325; Wed, 11 Sep 2013 19:17:57 +0900 (KST) Received: from AMDC2362.DIGITAL.local ([106.120.53.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MSY005MHHXOR040@mmp2.samsung.com>; Wed, 11 Sep 2013 19:17:57 +0900 (KST) From: Jacek Anaszewski To: linux-media@vger.kernel.org Cc: s.nawrocki@samsung.com, Jacek Anaszewski , Kyungmin Park , Hans Verkuil Subject: [PATCH] s5p-jpeg: Initialize vfd_decoder->vfl_dir field Date: Wed, 11 Sep 2013 12:17:45 +0200 Message-id: <1378894665-7393-1-git-send-email-j.anaszewski@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrOJMWRmVeSWpSXmKPExsVy+t9jQd1QZ4Mggx33eCxOTX7GZNF79Tmj xdmmN+wWPRu2slocftPO6sDq0bdlFaPH501yHqe+fmYPYI7isklJzcksSy3St0vgyuj7fYCx YDl3xelu9wbGa5xdjJwcEgImEp+bzrBC2GISF+6tZ+ti5OIQEpjOKNH5uZsZwmlnkuh6d48N pIpNwFDi54vXTCC2iIC8xJPeG2AdzCAd0xu2MoIkhAUcJJ71zAEbyyKgKvF93WFmEJtXwF1i yYx9QDUcQOsUJOZMspnAyL2AkWEVo2hqQXJBcVJ6rpFecWJucWleul5yfu4mRrD3n0nvYFzV YHGIUYCDUYmH94acfpAQa2JZcWXuIUYJDmYlEd4HpgZBQrwpiZVVqUX58UWlOanFhxilOViU xHkPtloHCgmkJ5akZqemFqQWwWSZODilGhitl6R0MRssPqxZmptTanTtSU7evUlX88pV/0Zc 2FLsPM0v+saD+MqcRzV1tzl+nMp7f6OG5+f2X2XRgts+ffr/S+vzapuJLvt5xNc9eNv4w+dx gM7q9znzpWrX5K869fWy3ARj+ZqL/hM5QzTa+1vcr1ZylPLOnyElyx4ZKC5lZaSkpvZwiZcS S3FGoqEWc1FxIgDL/i8C+gEAAA== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.7 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 This patch fixes regression introduced in the commit 5c77879ff9ab9e7 and caused by not initializing the vfl_dir field of the vfd_decoder instance of the struct video_device, after the field was introduced. It precluded calling the driver ioctls which require vfl_dir not to be equal to VFL_DIR_RX which is defined as 0 and uninitialized vfl_dir field is interpreted as such. In effect the unlikely() condition in the v4l_s_fmt function failed for the ioctls that expect is_tx to be false, which prevented the ioctl callbacks registered by the driver from being called. Signed-off-by: Jacek Anaszewski Signed-off-by: Kyungmin Park Cc: Hans Verkuil --- drivers/media/platform/s5p-jpeg/jpeg-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c index 88c5beb..1db4736 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c @@ -1424,6 +1424,7 @@ static int s5p_jpeg_probe(struct platform_device *pdev) jpeg->vfd_decoder->release = video_device_release; jpeg->vfd_decoder->lock = &jpeg->lock; jpeg->vfd_decoder->v4l2_dev = &jpeg->v4l2_dev; + jpeg->vfd_decoder->vfl_dir = VFL_DIR_M2M; ret = video_register_device(jpeg->vfd_decoder, VFL_TYPE_GRABBER, -1); if (ret) {