[media] vivi: use v4l2_ctrl_subscribe_event
authorHans Verkuil <hans.verkuil@cisco.com>
Fri, 27 Jan 2012 19:21:10 +0000 (16:21 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 14 Feb 2012 18:38:52 +0000 (16:38 -0200)
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/vivi.c

index 64a3b5276ccf0a2f5d66696394105c6107505b76..5e8b0710105b370f4e3e9df5b7791bf99b7c9957 100644 (file)
@@ -1001,17 +1001,6 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int i)
        return 0;
 }
 
-static int vidioc_subscribe_event(struct v4l2_fh *fh,
-                               struct v4l2_event_subscription *sub)
-{
-       switch (sub->type) {
-       case V4L2_EVENT_CTRL:
-               return v4l2_event_subscribe(fh, sub, 0);
-       default:
-               return -EINVAL;
-       }
-}
-
 /* --- controls ---------------------------------------------- */
 
 static int vivi_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
@@ -1203,7 +1192,7 @@ static const struct v4l2_ioctl_ops vivi_ioctl_ops = {
        .vidioc_streamon      = vidioc_streamon,
        .vidioc_streamoff     = vidioc_streamoff,
        .vidioc_log_status    = v4l2_ctrl_log_status,
-       .vidioc_subscribe_event = vidioc_subscribe_event,
+       .vidioc_subscribe_event = v4l2_ctrl_subscribe_event,
        .vidioc_unsubscribe_event = v4l2_event_unsubscribe,
 };