Commit d57fb9f8 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] gspca: Add support for control events

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 2333565d
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include <media/v4l2-ioctl.h> #include <media/v4l2-ioctl.h>
#include <media/v4l2-ctrls.h> #include <media/v4l2-ctrls.h>
#include <media/v4l2-fh.h> #include <media/v4l2-fh.h>
#include <media/v4l2-event.h>
#include "gspca.h" #include "gspca.h"
...@@ -2158,6 +2159,7 @@ static unsigned int dev_poll(struct file *file, poll_table *wait) ...@@ -2158,6 +2159,7 @@ static unsigned int dev_poll(struct file *file, poll_table *wait)
ret = POLLIN | POLLRDNORM; /* yes */ ret = POLLIN | POLLRDNORM; /* yes */
else else
ret = 0; ret = 0;
ret |= v4l2_ctrl_poll(file, wait);
mutex_unlock(&gspca_dev->queue_lock); mutex_unlock(&gspca_dev->queue_lock);
if (!gspca_dev->present) if (!gspca_dev->present)
return POLLHUP; return POLLHUP;
...@@ -2269,6 +2271,8 @@ static const struct v4l2_ioctl_ops dev_ioctl_ops = { ...@@ -2269,6 +2271,8 @@ static const struct v4l2_ioctl_ops dev_ioctl_ops = {
.vidioc_s_register = vidioc_s_register, .vidioc_s_register = vidioc_s_register,
#endif #endif
.vidioc_g_chip_ident = vidioc_g_chip_ident, .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 = { static const struct video_device gspca_template = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment