]> www.infradead.org Git - users/hch/misc.git/commitdiff
media: omap3isp: Drop custom .unsubscribe_event() handler
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 1 Aug 2025 21:19:31 +0000 (00:19 +0300)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Mon, 25 Aug 2025 13:40:32 +0000 (15:40 +0200)
The ccdc_unsubscribe_event() and omap3isp_stat_unsubscribe_event()
functions simply call v4l2_event_unsubscribe(), forwarding their
arguments. Replace them with the v4l2_event_subdev_unsubscribe() helper
that performs exactly the same operation.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/platform/ti/omap3isp/ispccdc.c
drivers/media/platform/ti/omap3isp/isph3a_aewb.c
drivers/media/platform/ti/omap3isp/isph3a_af.c
drivers/media/platform/ti/omap3isp/isphist.c
drivers/media/platform/ti/omap3isp/ispstat.c
drivers/media/platform/ti/omap3isp/ispstat.h

index 7d0c723dcd119a6325e69b26236bf6587649272b..55ee14e8b4491887aa1fec7653be5be6424536ed 100644 (file)
@@ -1873,12 +1873,6 @@ static int ccdc_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
        return v4l2_event_subscribe(fh, sub, OMAP3ISP_CCDC_NEVENTS, NULL);
 }
 
-static int ccdc_unsubscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
-                                 struct v4l2_event_subscription *sub)
-{
-       return v4l2_event_unsubscribe(fh, sub);
-}
-
 /*
  * ccdc_set_stream - Enable/Disable streaming on the CCDC module
  * @sd: ISP CCDC V4L2 subdevice
@@ -2487,7 +2481,7 @@ static int ccdc_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
 static const struct v4l2_subdev_core_ops ccdc_v4l2_core_ops = {
        .ioctl = ccdc_ioctl,
        .subscribe_event = ccdc_subscribe_event,
-       .unsubscribe_event = ccdc_unsubscribe_event,
+       .unsubscribe_event = v4l2_event_subdev_unsubscribe,
 };
 
 /* V4L2 subdev video operations */
index e6c54c4bbfca74d77d48c2645f6d0a7894047047..ae93da9c4542e84d8aad87e4195be42c2ed448c8 100644 (file)
@@ -269,7 +269,7 @@ static const struct ispstat_ops h3a_aewb_ops = {
 static const struct v4l2_subdev_core_ops h3a_aewb_subdev_core_ops = {
        .ioctl = h3a_aewb_ioctl,
        .subscribe_event = omap3isp_stat_subscribe_event,
-       .unsubscribe_event = omap3isp_stat_unsubscribe_event,
+       .unsubscribe_event = v4l2_event_subdev_unsubscribe,
 };
 
 static const struct v4l2_subdev_video_ops h3a_aewb_subdev_video_ops = {
index de7b116d0122887c1c05eafd578cb4febc6a4af3..ca478da4ad342a111ede6575aaef9b60853edd58 100644 (file)
@@ -334,7 +334,7 @@ static const struct ispstat_ops h3a_af_ops = {
 static const struct v4l2_subdev_core_ops h3a_af_subdev_core_ops = {
        .ioctl = h3a_af_ioctl,
        .subscribe_event = omap3isp_stat_subscribe_event,
-       .unsubscribe_event = omap3isp_stat_unsubscribe_event,
+       .unsubscribe_event = v4l2_event_subdev_unsubscribe,
 };
 
 static const struct v4l2_subdev_video_ops h3a_af_subdev_video_ops = {
index 0ef78aace6dae1d69cbd20c8e7c6b86261bb82d2..7851ad13d84f00b5b2996355e5e50c58066dfd4c 100644 (file)
@@ -456,7 +456,7 @@ static const struct ispstat_ops hist_ops = {
 static const struct v4l2_subdev_core_ops hist_subdev_core_ops = {
        .ioctl = hist_ioctl,
        .subscribe_event = omap3isp_stat_subscribe_event,
-       .unsubscribe_event = omap3isp_stat_unsubscribe_event,
+       .unsubscribe_event = v4l2_event_subdev_unsubscribe,
 };
 
 static const struct v4l2_subdev_video_ops hist_subdev_video_ops = {
index d3da68408ecb16e0f600ddd2223d7e60c2084c37..07bd62a93d9902249862edb0e1ec0d248ccfcf3c 100644 (file)
@@ -1010,13 +1010,6 @@ int omap3isp_stat_subscribe_event(struct v4l2_subdev *subdev,
        return v4l2_event_subscribe(fh, sub, STAT_NEVENTS, NULL);
 }
 
-int omap3isp_stat_unsubscribe_event(struct v4l2_subdev *subdev,
-                                   struct v4l2_fh *fh,
-                                   struct v4l2_event_subscription *sub)
-{
-       return v4l2_event_unsubscribe(fh, sub);
-}
-
 void omap3isp_stat_unregister_entities(struct ispstat *stat)
 {
        v4l2_device_unregister_subdev(&stat->subdev);
index b548e617cf627588737bfdb80c68dcaacae3aa59..59842c4a9c3325ba5a078c66dc95a852bd997e9a 100644 (file)
@@ -135,9 +135,6 @@ void omap3isp_stat_cleanup(struct ispstat *stat);
 int omap3isp_stat_subscribe_event(struct v4l2_subdev *subdev,
                                  struct v4l2_fh *fh,
                                  struct v4l2_event_subscription *sub);
-int omap3isp_stat_unsubscribe_event(struct v4l2_subdev *subdev,
-                                   struct v4l2_fh *fh,
-                                   struct v4l2_event_subscription *sub);
 int omap3isp_stat_s_stream(struct v4l2_subdev *subdev, int enable);
 
 int omap3isp_stat_busy(struct ispstat *stat);