Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f4d14b7 authored by Sylwester Nawrocki's avatar Sylwester Nawrocki Committed by Mauro Carvalho Chehab
Browse files

[media] V4L: Add v4l2_event_subdev_unsubscribe() helper function



Add a v4l2 core helper function that can be used as the subdev
.unsubscribe_event handler. This allows to eliminate some
boilerplate from drivers that are only handling the control events.

Signed-off-by: default avatarSylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 2ccbe779
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -311,3 +311,10 @@ int v4l2_event_unsubscribe(struct v4l2_fh *fh,
	return 0;
	return 0;
}
}
EXPORT_SYMBOL_GPL(v4l2_event_unsubscribe);
EXPORT_SYMBOL_GPL(v4l2_event_unsubscribe);

int v4l2_event_subdev_unsubscribe(struct v4l2_subdev *sd, struct v4l2_fh *fh,
				  struct v4l2_event_subscription *sub)
{
	return v4l2_event_unsubscribe(fh, sub);
}
EXPORT_SYMBOL_GPL(v4l2_event_subdev_unsubscribe);
+3 −1
Original line number Original line Diff line number Diff line
@@ -64,6 +64,7 @@
 */
 */


struct v4l2_fh;
struct v4l2_fh;
struct v4l2_subdev;
struct v4l2_subscribed_event;
struct v4l2_subscribed_event;
struct video_device;
struct video_device;


@@ -129,5 +130,6 @@ int v4l2_event_subscribe(struct v4l2_fh *fh,
int v4l2_event_unsubscribe(struct v4l2_fh *fh,
int v4l2_event_unsubscribe(struct v4l2_fh *fh,
			   const struct v4l2_event_subscription *sub);
			   const struct v4l2_event_subscription *sub);
void v4l2_event_unsubscribe_all(struct v4l2_fh *fh);
void v4l2_event_unsubscribe_all(struct v4l2_fh *fh);

int v4l2_event_subdev_unsubscribe(struct v4l2_subdev *sd, struct v4l2_fh *fh,
				  struct v4l2_event_subscription *sub);
#endif /* V4L2_EVENT_H */
#endif /* V4L2_EVENT_H */