From patchwork Mon Jan 18 16:10:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacek Anaszewski X-Patchwork-Id: 8055901 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 87A0D9F440 for ; Mon, 18 Jan 2016 16:10:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B2AF2204AD for ; Mon, 18 Jan 2016 16:10:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B66B22049C for ; Mon, 18 Jan 2016 16:10:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755557AbcARQKn (ORCPT ); Mon, 18 Jan 2016 11:10:43 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:59449 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755455AbcARQKm (ORCPT ); Mon, 18 Jan 2016 11:10:42 -0500 Received: from epcpsbgm1new.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O15017JCOXPOM20@mailout1.samsung.com> for linux-media@vger.kernel.org; Tue, 19 Jan 2016 01:10:41 +0900 (KST) X-AuditID: cbfee61a-f79266d000003652-b5-569d0e816295 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 8D.01.13906.18E0D965; Tue, 19 Jan 2016 01:10:41 +0900 (KST) Received: from AMDC2362.DIGITAL.local ([106.120.53.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O15002PEOXHRQ00@mmp2.samsung.com>; Tue, 19 Jan 2016 01:10:41 +0900 (KST) From: Jacek Anaszewski To: linux-media@vger.kernel.org Cc: Jacek Anaszewski , Sylwester Nawrocki Subject: [PATCH 1/3] s5k6a3: Fix VIDIOC_SUBDEV_G_FMT ioctl for TRY format Date: Mon, 18 Jan 2016 17:10:25 +0100 Message-id: <1453133427-20793-2-git-send-email-j.anaszewski@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1453133427-20793-1-git-send-email-j.anaszewski@samsung.com> References: <1453133427-20793-1-git-send-email-j.anaszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrEJMWRmVeSWpSXmKPExsVy+t9jQd1GvrlhBmd/c1j0Xn3OaNGzYSur xeE37awOzB59W1YxenzeJBfAFMVlk5Kak1mWWqRvl8CVMe/icZaCjRwVR+ZMYGtg/MfWxcjB ISFgInF3u1YXIyeQKSZx4d56oDAXh5DALEaJXys3s0A4PxklFj66wQRSxSZgKPHzxWswW0RA XuJJ7w02EJtZIE7iwdkTzCC2sICnxKXLC8HiLAKqEq9O32UHsXkFPCSmH3vIBLFYQWLOJBuQ MCdQecf7A2AjhYBKls/uYJ7AyLuAkWEVo0RqQXJBcVJ6rmFearlecWJucWleul5yfu4mRnBI PJPawXhwl/shRgEORiUeXoezs8OEWBPLiitzDzFKcDArifAe4pgbJsSbklhZlVqUH19UmpNa fIhRmoNFSZy39lJkmJBAemJJanZqakFqEUyWiYNTqoExUWhDcvQr6/451eX1640+/GMNaBC/ qmB8YPrPLvt/C9261v//J3Np/UnXJ27fXoX9u/xFd4b/pfob6w7tm7uDa42589bN7BsPHd2v 4JvW/tnyx5eik/MXtwbHTjB8p5ax+Na/oOYTV+bKRR58NYvR+HKfB+eGHcZtJ1xlStSrLPd8 6Szl2/fyjxJLcUaioRZzUXEiAGH0ieUFAgAA 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 VIDIOC_SUBDEV_G_FMT ioctl should return TRY format previously set with VIDIOC_SUBDEV_S_FMT. Currently it is not the case as only ACTIVE formats are saved in the driver. Since the driver doesn't alter hardware state in the set_fmt op anyway, the op can save the format in both TRY and ACTIVE case. Signed-off-by: Jacek Anaszewski Acked-by: Kyungmin Park Cc: Sylwester Nawrocki --- drivers/media/i2c/s5k6a3.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/i2c/s5k6a3.c b/drivers/media/i2c/s5k6a3.c index b1b1574..ba74b91 100644 --- a/drivers/media/i2c/s5k6a3.c +++ b/drivers/media/i2c/s5k6a3.c @@ -144,8 +144,7 @@ static int s5k6a3_set_fmt(struct v4l2_subdev *sd, mf = __s5k6a3_get_format(sensor, cfg, fmt->pad, fmt->which); if (mf) { mutex_lock(&sensor->lock); - if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE) - *mf = fmt->format; + *mf = fmt->format; mutex_unlock(&sensor->lock); } return 0;