From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-media@vger.kernel.org
Cc: Hans de Goede <hansg@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Steve Longerbeam <slongerbeam@gmail.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Hans Verkuil <hverkuil@kernel.org>,
linux-staging@lists.linux.dev, imx@lists.linux.dev
Subject: [PATCH 3/3] media: staging: imx: Drop custom .unsubscribe_event() handler
Date: Sat, 2 Aug 2025 00:19:33 +0300 [thread overview]
Message-ID: <20250801211933.22553-4-laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <20250801211933.22553-1-laurent.pinchart@ideasonboard.com>
The csi_unsubscribe_event() function simply calls
v4l2_event_unsubscribe(), forwarding its arguments. Replace it with the
v4l2_event_subdev_unsubscribe() helper that performs exactly the same
operation.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/staging/media/imx/imx-media-csi.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c
index a7cd3ef95fc3..fd7e37d803e7 100644
--- a/drivers/staging/media/imx/imx-media-csi.c
+++ b/drivers/staging/media/imx/imx-media-csi.c
@@ -1751,12 +1751,6 @@ static int csi_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
return v4l2_event_subscribe(fh, sub, 0, NULL);
}
-static int csi_unsubscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
- struct v4l2_event_subscription *sub)
-{
- return v4l2_event_unsubscribe(fh, sub);
-}
-
static int csi_registered(struct v4l2_subdev *sd)
{
struct csi_priv *priv = v4l2_get_subdevdata(sd);
@@ -1872,7 +1866,7 @@ static const struct media_entity_operations csi_entity_ops = {
static const struct v4l2_subdev_core_ops csi_core_ops = {
.subscribe_event = csi_subscribe_event,
- .unsubscribe_event = csi_unsubscribe_event,
+ .unsubscribe_event = v4l2_event_subdev_unsubscribe,
};
static const struct v4l2_subdev_video_ops csi_video_ops = {
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2025-08-01 21:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-01 21:19 [PATCH 0/3] media: Use v4l2_event_subdev_unsubscribe() in more drivers Laurent Pinchart
2025-08-01 21:19 ` [PATCH 1/3] media: omap3isp: Drop custom .unsubscribe_event() handler Laurent Pinchart
2025-08-01 21:19 ` [PATCH 2/3] media: staging: atomisp: " Laurent Pinchart
2025-08-01 21:19 ` Laurent Pinchart [this message]
2025-08-05 20:52 ` [PATCH 3/3] media: staging: imx: " Frank Li
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=20250801211933.22553-4-laurent.pinchart@ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=hansg@kernel.org \
--cc=hverkuil@kernel.org \
--cc=imx@lists.linux.dev \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=p.zabel@pengutronix.de \
--cc=sakari.ailus@linux.intel.com \
--cc=slongerbeam@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