From: Hans Verkuil Date: Sun, 6 May 2012 12:28:20 +0000 (-0300) Subject: [media] gspca: Add support for control events X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d57fb9f8a69deb521ffabac02d2fea484141e59c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [media] gspca: Add support for control events Signed-off-by: Hans Verkuil Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index ed33a8773f7e..9fe723c6acb4 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -40,6 +40,7 @@ #include #include #include +#include #include "gspca.h" @@ -2158,6 +2159,7 @@ static unsigned int dev_poll(struct file *file, poll_table *wait) ret = POLLIN | POLLRDNORM; /* yes */ else ret = 0; + ret |= v4l2_ctrl_poll(file, wait); mutex_unlock(&gspca_dev->queue_lock); if (!gspca_dev->present) return POLLHUP; @@ -2269,6 +2271,8 @@ static const struct v4l2_ioctl_ops dev_ioctl_ops = { .vidioc_s_register = vidioc_s_register, #endif .vidioc_g_chip_ident = vidioc_g_chip_ident, + .vidioc_subscribe_event = v4l2_ctrl_subscribe_event, + .vidioc_unsubscribe_event = v4l2_event_unsubscribe, }; static const struct video_device gspca_template = {