]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
[media] ivtv: improve subscribe_event handling
authorGustavo Padovan <gustavo.padovan@collabora.com>
Wed, 15 Feb 2017 17:55:29 +0000 (15:55 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 22 Mar 2017 13:10:50 +0000 (10:10 -0300)
Simplify logic and call v4l2_ctrl_subscribe_event() directly instead
of copying its content over to ivtv_subscribe_event().

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/ivtv/ivtv-ioctl.c

index f956188f7f196699d4279a66a2a0c55b1a683e1b..670462d195b55c9738d669ec421e00ed4b3878a3 100644 (file)
@@ -1506,10 +1506,8 @@ static int ivtv_subscribe_event(struct v4l2_fh *fh, const struct v4l2_event_subs
        case V4L2_EVENT_VSYNC:
        case V4L2_EVENT_EOS:
                return v4l2_event_subscribe(fh, sub, 0, NULL);
-       case V4L2_EVENT_CTRL:
-               return v4l2_event_subscribe(fh, sub, 0, &v4l2_ctrl_sub_ev_ops);
        default:
-               return -EINVAL;
+               return v4l2_ctrl_subscribe_event(fh, sub);
        }
 }