From: Oliver Neukum <oneukum@suse.com>
To: mchehab@kernel.org, hverkuil+cisco@kernel.org,
laurent.pinchart+renesas@ideasonboard.com,
linux-media@vger.kernel.org
Cc: Oliver Neukum <oneukum@suse.com>
Subject: [PATCH] drivers: media: remove V4L2_FL_USES_V4L2_FH
Date: Mon, 20 Apr 2026 16:29:17 +0200 [thread overview]
Message-ID: <20260420142917.652245-1-oneukum@suse.com> (raw)
As usage of the feature is mandatory there is no point
in keeping the flag for it.
Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
drivers/media/v4l2-core/v4l2-dev.c | 8 --------
drivers/media/v4l2-core/v4l2-fh.c | 1 -
include/media/v4l2-dev.h | 5 -----
3 files changed, 14 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c
index 6ce623a1245a..5db1461d2159 100644
--- a/drivers/media/v4l2-core/v4l2-dev.c
+++ b/drivers/media/v4l2-core/v4l2-dev.c
@@ -431,14 +431,6 @@ static int v4l2_open(struct inode *inode, struct file *filp)
}
ret = vdev->fops->open(filp);
- if (ret)
- goto done;
-
- /* All drivers must use v4l2_fh. */
- if (WARN_ON(!test_bit(V4L2_FL_USES_V4L2_FH, &vdev->flags))) {
- vdev->fops->release(filp);
- ret = -ENODEV;
- }
done:
if (vdev->dev_debug & V4L2_DEV_DEBUG_FOP)
diff --git a/drivers/media/v4l2-core/v4l2-fh.c b/drivers/media/v4l2-core/v4l2-fh.c
index b184bed8aca9..8741e623bd17 100644
--- a/drivers/media/v4l2-core/v4l2-fh.c
+++ b/drivers/media/v4l2-core/v4l2-fh.c
@@ -24,7 +24,6 @@ void v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev)
/* Inherit from video_device. May be overridden by the driver. */
fh->ctrl_handler = vdev->ctrl_handler;
INIT_LIST_HEAD(&fh->list);
- set_bit(V4L2_FL_USES_V4L2_FH, &fh->vdev->flags);
/*
* determine_valid_ioctls() does not know if struct v4l2_fh
* is used by this driver, but here we do. So enable the
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index 2e0f6d2e6a78..7201f7787ce0 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -71,10 +71,6 @@ struct dentry;
* indicates that a &struct video_device is registered.
* Drivers can clear this flag if they want to block all future
* device access. It is cleared by video_unregister_device.
- * @V4L2_FL_USES_V4L2_FH:
- * indicates that file->private_data points to &struct v4l2_fh.
- * This flag is set by the core when v4l2_fh_init() is called.
- * All drivers must use it.
* @V4L2_FL_QUIRK_INVERTED_CROP:
* some old M2M drivers use g/s_crop/cropcap incorrectly: crop and
* compose are swapped. If this flag is set, then the selection
@@ -92,7 +88,6 @@ struct dentry;
*/
enum v4l2_video_device_flags {
V4L2_FL_REGISTERED = 0,
- V4L2_FL_USES_V4L2_FH = 1,
V4L2_FL_QUIRK_INVERTED_CROP = 2,
V4L2_FL_SUBDEV_RO_DEVNODE = 3,
};
--
2.53.0
next reply other threads:[~2026-04-20 14:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 14:29 Oliver Neukum [this message]
2026-04-20 21:52 ` [PATCH] drivers: media: remove V4L2_FL_USES_V4L2_FH Laurent Pinchart
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=20260420142917.652245-1-oneukum@suse.com \
--to=oneukum@suse.com \
--cc=hverkuil+cisco@kernel.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/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