summary refs log tree commit diff
path: root/drivers/media/pci/ivtv
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.com>2017-02-15 15:55:29 -0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-03-22 10:10:50 -0300
commit88b172f9f9d42bd83b6e22473321bd2fd4052c47 (patch)
tree74454feab9aef601ddff8d86002467dd873cf9de /drivers/media/pci/ivtv
parent938e20adfd2ccfac0f3858ee898f3a0e2641d457 (diff)
downloadlinux-88b172f9f9d42bd83b6e22473321bd2fd4052c47.tar.gz
[media] ivtv: improve subscribe_event handling
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>
Diffstat (limited to 'drivers/media/pci/ivtv')
-rw-r--r--drivers/media/pci/ivtv/ivtv-ioctl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c
index f956188f7f19..670462d195b5 100644
--- a/drivers/media/pci/ivtv/ivtv-ioctl.c
+++ b/drivers/media/pci/ivtv/ivtv-ioctl.c
@@ -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);
 	}
 }