From: Hans de Goede <hdegoede@redhat.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
Tsuchiya Yuto <kitakar@gmail.com>,
Andy Shevchenko <andy@kernel.org>,
Yury Luneff <yury.lunev@gmail.com>,
Nable <nable.maininbox@googlemail.com>,
andrey.i.trufanov@gmail.com, Fabio Aiuto <fabioaiuto83@gmail.com>,
Kate Hsuan <hpa@redhat.com>,
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 [thread overview]
Message-ID: <20230619105212.303653-7-hdegoede@redhat.com> (raw)
In-Reply-To: <20230619105212.303653-1-hdegoede@redhat.com>
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 <hdegoede@redhat.com>
---
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);
--
2.40.1
next prev parent reply other threads:[~2023-06-19 10:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-19 10:52 [PATCH 1/7] media: atomisp: Fix missing v4l2_fh_release() in atomisp_open() error exit Hans de Goede
2023-06-19 10:52 ` [PATCH 2/7] media: atomisp: Remove bogus asd == NULL checks Hans de Goede
2023-06-19 10:52 ` [PATCH 3/7] media: atomisp: Clamp width to max 1920 pixels when in ATOMISP_RUN_MODE_PREVIEW Hans de Goede
2023-06-19 10:52 ` [PATCH 4/7] media: atomisp: Change atomisp_enum_framesizes() too small cut off from 2/3th to 5/8th Hans de Goede
2023-06-19 10:52 ` [PATCH 5/7] media: atomisp: Add some higher resolutions to atomisp_enum_framesizes() Hans de Goede
2023-06-19 10:52 ` [PATCH 6/7] media: atomisp: Remove support for custom run-mode v4l2-ctrl on sensors Hans de Goede
2023-06-19 11:12 ` Andy Shevchenko
2023-06-19 10:52 ` Hans de Goede [this message]
2023-06-19 11:12 ` [PATCH 1/7] media: atomisp: Fix missing v4l2_fh_release() in atomisp_open() error exit Andy Shevchenko
2023-06-21 19:09 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230619105212.303653-7-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=andrey.i.trufanov@gmail.com \
--cc=andy@kernel.org \
--cc=fabioaiuto83@gmail.com \
--cc=hpa@redhat.com \
--cc=kitakar@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=nable.maininbox@googlemail.com \
--cc=sakari.ailus@linux.intel.com \
--cc=yury.lunev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox