Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2538411imu; Thu, 29 Nov 2018 06:35:01 -0800 (PST) X-Google-Smtp-Source: AFSGD/XNy6CzOmAotSrWLybEpcbGeIPJpsDv8NjrXIbEQBGJDNN69TCGK4WIJ91z2C25rHEA/klX X-Received: by 2002:a17:902:1005:: with SMTP id b5mr1719064pla.310.1543502101397; Thu, 29 Nov 2018 06:35:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543502101; cv=none; d=google.com; s=arc-20160816; b=QCNf6Moa0szhYn883a3VNjmVbCg9/A4Xk8v795g/q3y4LpnkAmhNJq8/uZXOJrATvb GCBhEm4Fo40Ytjn3XH9EFhqbTNtx/J7IUx265snUKqUr7rUCrvke2SPOBCIjL7CrUI37 kx07u4pGDYsxC37Mjs63wA+lbO9m14v4qEPzhM0i2YZSqA9x5Hm0F5FOCszkjiHIgaUh zawFrQL0IgW1uKixlyDWxdnmzAHZwHOjAW6g72eXWyiwiS3mVQPZ8C6nj+VCTaXW4/o+ 6YiYEw5JtzC113bDmRyDinKu7af5tR6otIKv5ZrFIP3dVH0OXAzU+jmzBMTZc9q3E4Ng iCpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AtmPSnw+oNLf3WBjzUZfYm5DrXx6l0/RFrQKaeYathA=; b=tWkO2zNxVRnDP+q9aoNe12f+T+Ffcj8+w3cPoetimM+gNmPdBWBQ8Yd2IJUQIsexT/ LdP5aACMhXDpdwmVNjrYppveT7qw9FVvi1eM+jQ3aY5iUjw0DPUM6Usz+4RgdOsPsWBW yDa11pFElbPejvDeK7ABjmsInbLrIiIKj8yMMHFofWp2AViV2iLNc6SPX3aASixRhnLG w12nK6tedmvq1353phtbR+K80/PQNlHaP4nE7u/JMXCYVHhm14WRyEbQPN7QDMNz2KxW ZocYKZa1PPtCE6HjdOsqE9tjOis1BZOcJeWwASwnejpk4cwyqanpW6qU4y7aapxSwZig 7YHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SvVSPqth; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j5si2333561pfg.254.2018.11.29.06.34.45; Thu, 29 Nov 2018 06:35:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SvVSPqth; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389535AbeK3BiM (ORCPT + 99 others); Thu, 29 Nov 2018 20:38:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:41558 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729157AbeK3BiL (ORCPT ); Thu, 29 Nov 2018 20:38:11 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 545102145D; Thu, 29 Nov 2018 14:32:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543501957; bh=yTcEiYZ8xJEn4vsZhhx1s4SxYhlxw4MSau60bh0QXbg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SvVSPqthr+Ii9rr8COhWR/ATT0/pBa280ilBfgVDGaZCR8BtgDilnWxMe0Z7wFvc0 D1MaMgrbBDwSXy8ulSnzVjKdRjNZH8q1uG9ZrJ0fCkc3ExErwOnQ3r/UDcfkC/J6FZ xQBVrvDJ2uQ1wpnXzE1S8KtNS8jIELemL6G0vmDA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hugues Fruchet , Jacopo Mondi , Sakari Ailus , Mauro Carvalho Chehab , Adam Ford Subject: [PATCH 4.19 110/110] media: ov5640: fix auto controls values when switching to manual mode Date: Thu, 29 Nov 2018 15:13:21 +0100 Message-Id: <20181129135925.730818989@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129135921.231283053@linuxfoundation.org> References: <20181129135921.231283053@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Hugues Fruchet commit a8f438c684eaa4cbe6c98828eb996d5ec53e24fb upstream. When switching from auto to manual mode, V4L2 core is calling g_volatile_ctrl() in manual mode in order to get the manual initial value. Remove the manual mode check/return to not break this behaviour. Signed-off-by: Hugues Fruchet Tested-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Adam Ford Signed-off-by: Greg Kroah-Hartman --- drivers/media/i2c/ov5640.c | 4 ---- 1 file changed, 4 deletions(-) --- a/drivers/media/i2c/ov5640.c +++ b/drivers/media/i2c/ov5640.c @@ -2337,16 +2337,12 @@ static int ov5640_g_volatile_ctrl(struct switch (ctrl->id) { case V4L2_CID_AUTOGAIN: - if (!ctrl->val) - return 0; val = ov5640_get_gain(sensor); if (val < 0) return val; sensor->ctrls.gain->val = val; break; case V4L2_CID_EXPOSURE_AUTO: - if (ctrl->val == V4L2_EXPOSURE_MANUAL) - return 0; val = ov5640_get_exposure(sensor); if (val < 0) return val;