Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: omap3isp: Drop custom .unsubscribe_event() handler

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>

authored by

Laurent Pinchart and committed by
Hans Verkuil
1182d0dd 5195b777

+4 -20
+1 -7
drivers/media/platform/ti/omap3isp/ispccdc.c
··· 1873 1873 return v4l2_event_subscribe(fh, sub, OMAP3ISP_CCDC_NEVENTS, NULL); 1874 1874 } 1875 1875 1876 - static int ccdc_unsubscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, 1877 - struct v4l2_event_subscription *sub) 1878 - { 1879 - return v4l2_event_unsubscribe(fh, sub); 1880 - } 1881 - 1882 1876 /* 1883 1877 * ccdc_set_stream - Enable/Disable streaming on the CCDC module 1884 1878 * @sd: ISP CCDC V4L2 subdevice ··· 2481 2487 static const struct v4l2_subdev_core_ops ccdc_v4l2_core_ops = { 2482 2488 .ioctl = ccdc_ioctl, 2483 2489 .subscribe_event = ccdc_subscribe_event, 2484 - .unsubscribe_event = ccdc_unsubscribe_event, 2490 + .unsubscribe_event = v4l2_event_subdev_unsubscribe, 2485 2491 }; 2486 2492 2487 2493 /* V4L2 subdev video operations */
+1 -1
drivers/media/platform/ti/omap3isp/isph3a_aewb.c
··· 269 269 static const struct v4l2_subdev_core_ops h3a_aewb_subdev_core_ops = { 270 270 .ioctl = h3a_aewb_ioctl, 271 271 .subscribe_event = omap3isp_stat_subscribe_event, 272 - .unsubscribe_event = omap3isp_stat_unsubscribe_event, 272 + .unsubscribe_event = v4l2_event_subdev_unsubscribe, 273 273 }; 274 274 275 275 static const struct v4l2_subdev_video_ops h3a_aewb_subdev_video_ops = {
+1 -1
drivers/media/platform/ti/omap3isp/isph3a_af.c
··· 334 334 static const struct v4l2_subdev_core_ops h3a_af_subdev_core_ops = { 335 335 .ioctl = h3a_af_ioctl, 336 336 .subscribe_event = omap3isp_stat_subscribe_event, 337 - .unsubscribe_event = omap3isp_stat_unsubscribe_event, 337 + .unsubscribe_event = v4l2_event_subdev_unsubscribe, 338 338 }; 339 339 340 340 static const struct v4l2_subdev_video_ops h3a_af_subdev_video_ops = {
+1 -1
drivers/media/platform/ti/omap3isp/isphist.c
··· 456 456 static const struct v4l2_subdev_core_ops hist_subdev_core_ops = { 457 457 .ioctl = hist_ioctl, 458 458 .subscribe_event = omap3isp_stat_subscribe_event, 459 - .unsubscribe_event = omap3isp_stat_unsubscribe_event, 459 + .unsubscribe_event = v4l2_event_subdev_unsubscribe, 460 460 }; 461 461 462 462 static const struct v4l2_subdev_video_ops hist_subdev_video_ops = {
-7
drivers/media/platform/ti/omap3isp/ispstat.c
··· 1010 1010 return v4l2_event_subscribe(fh, sub, STAT_NEVENTS, NULL); 1011 1011 } 1012 1012 1013 - int omap3isp_stat_unsubscribe_event(struct v4l2_subdev *subdev, 1014 - struct v4l2_fh *fh, 1015 - struct v4l2_event_subscription *sub) 1016 - { 1017 - return v4l2_event_unsubscribe(fh, sub); 1018 - } 1019 - 1020 1013 void omap3isp_stat_unregister_entities(struct ispstat *stat) 1021 1014 { 1022 1015 v4l2_device_unregister_subdev(&stat->subdev);
-3
drivers/media/platform/ti/omap3isp/ispstat.h
··· 135 135 int omap3isp_stat_subscribe_event(struct v4l2_subdev *subdev, 136 136 struct v4l2_fh *fh, 137 137 struct v4l2_event_subscription *sub); 138 - int omap3isp_stat_unsubscribe_event(struct v4l2_subdev *subdev, 139 - struct v4l2_fh *fh, 140 - struct v4l2_event_subscription *sub); 141 138 int omap3isp_stat_s_stream(struct v4l2_subdev *subdev, int enable); 142 139 143 140 int omap3isp_stat_busy(struct ispstat *stat);