From patchwork Mon Jun 19 10:52:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 13284337 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78E75EB64DD for ; Mon, 19 Jun 2023 10:55:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232206AbjFSKzP (ORCPT ); Mon, 19 Jun 2023 06:55:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232349AbjFSKym (ORCPT ); Mon, 19 Jun 2023 06:54:42 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D88F8170D for ; Mon, 19 Jun 2023 03:52:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687171950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rocdS1G7kg2dzftmRc7177VXemHXk6WwFOcw3sbeAgo=; b=TKwtntC492I+8ILmAUKv5Z9nQkL50GEk3+qdG2amhqCz4bzMBxVe7/wJZMD4sM42Od5Ao+ NOzH6PCkY+Z41XAChp2EL441cw2U54ffSqMOGpxOV2UiI0I9qU4G6NQgi0/FBSrVnnBFqT vLVLqDKT7Ha9iLDTPTSmAaDfFi9pckc= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-652-Mck3YCOEPlGymSYRi3FGJA-1; Mon, 19 Jun 2023 06:52:27 -0400 X-MC-Unique: Mck3YCOEPlGymSYRi3FGJA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D3F36380671B; Mon, 19 Jun 2023 10:52:26 +0000 (UTC) Received: from x1.localdomain.com (unknown [10.39.193.97]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3D453112132C; Mon, 19 Jun 2023 10:52:25 +0000 (UTC) From: Hans de Goede To: Mauro Carvalho Chehab , Sakari Ailus Cc: Hans de Goede , Tsuchiya Yuto , Andy Shevchenko , Yury Luneff , Nable , andrey.i.trufanov@gmail.com, Fabio Aiuto , Kate Hsuan , linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH 7/7] media: atomisp: Remove v4l2_ctrl_s_ctrl(asd->run_mode) calls from atomisp_open() Date: Mon, 19 Jun 2023 12:52:12 +0200 Message-Id: <20230619105212.303653-7-hdegoede@redhat.com> In-Reply-To: <20230619105212.303653-1-hdegoede@redhat.com> References: <20230619105212.303653-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The v4l2_ctrl_s_ctrl(asd->run_mode) call in atomisp_subdev_init_struct() gets immediately overridden by a second call directly after atomisp_subdev_init_struct() is called. And the second call in atomisp_open() also is not helpful. ATOMISP_RUN_MODE_PREVIEW is the default and if changed controls are supposed to stay changed over an open/close of the /dev/video# node. So drop both calls. Signed-off-by: Hans de Goede --- drivers/staging/media/atomisp/pci/atomisp_fops.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_fops.c b/drivers/staging/media/atomisp/pci/atomisp_fops.c index a09087dccbcb..4dba6120af39 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_fops.c +++ b/drivers/staging/media/atomisp/pci/atomisp_fops.c @@ -460,7 +460,6 @@ static void atomisp_dev_init_struct(struct atomisp_device *isp) static void atomisp_subdev_init_struct(struct atomisp_sub_device *asd) { - v4l2_ctrl_s_ctrl(asd->run_mode, ATOMISP_RUN_MODE_STILL_CAPTURE); memset(&asd->params.css_param, 0, sizeof(asd->params.css_param)); asd->params.color_effect = V4L2_COLORFX_NONE; asd->params.bad_pixel_en = true; @@ -533,8 +532,6 @@ static int atomisp_open(struct file *file) } atomisp_subdev_init_struct(asd); - /* Ensure that a mode is set */ - v4l2_ctrl_s_ctrl(asd->run_mode, ATOMISP_RUN_MODE_PREVIEW); pipe->users++; mutex_unlock(&isp->mutex);