diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-05-06 08:28:20 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-14 08:27:23 -0400 |
commit | d57fb9f8a69deb521ffabac02d2fea484141e59c (patch) | |
tree | bc171eed7ce652feff529da6e3e2e7f6439646a0 /drivers/media/video/gspca/gspca.c | |
parent | 2333565d94c1efd199782bdedc9f4d9b06198583 (diff) |
[media] gspca: Add support for control events
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/gspca.c')
-rw-r--r-- | drivers/media/video/gspca/gspca.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 @@ | |||
40 | #include <media/v4l2-ioctl.h> | 40 | #include <media/v4l2-ioctl.h> |
41 | #include <media/v4l2-ctrls.h> | 41 | #include <media/v4l2-ctrls.h> |
42 | #include <media/v4l2-fh.h> | 42 | #include <media/v4l2-fh.h> |
43 | #include <media/v4l2-event.h> | ||
43 | 44 | ||
44 | #include "gspca.h" | 45 | #include "gspca.h" |
45 | 46 | ||
@@ -2158,6 +2159,7 @@ static unsigned int dev_poll(struct file *file, poll_table *wait) | |||
2158 | ret = POLLIN | POLLRDNORM; /* yes */ | 2159 | ret = POLLIN | POLLRDNORM; /* yes */ |
2159 | else | 2160 | else |
2160 | ret = 0; | 2161 | ret = 0; |
2162 | ret |= v4l2_ctrl_poll(file, wait); | ||
2161 | mutex_unlock(&gspca_dev->queue_lock); | 2163 | mutex_unlock(&gspca_dev->queue_lock); |
2162 | if (!gspca_dev->present) | 2164 | if (!gspca_dev->present) |
2163 | return POLLHUP; | 2165 | return POLLHUP; |
@@ -2269,6 +2271,8 @@ static const struct v4l2_ioctl_ops dev_ioctl_ops = { | |||
2269 | .vidioc_s_register = vidioc_s_register, | 2271 | .vidioc_s_register = vidioc_s_register, |
2270 | #endif | 2272 | #endif |
2271 | .vidioc_g_chip_ident = vidioc_g_chip_ident, | 2273 | .vidioc_g_chip_ident = vidioc_g_chip_ident, |
2274 | .vidioc_subscribe_event = v4l2_ctrl_subscribe_event, | ||
2275 | .vidioc_unsubscribe_event = v4l2_event_unsubscribe, | ||
2272 | }; | 2276 | }; |
2273 | 2277 | ||
2274 | static const struct video_device gspca_template = { | 2278 | static const struct video_device gspca_template = { |