summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/uvc_v4l2.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2011-06-13 22:44:42 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 22:53:31 +0200
commit523f46d6aba9dcb0a2d0fc474ca884e93a7cf198 (patch)
tree5c73cecf3d9786868ac03c93f7df2df6a465d9a6 /drivers/usb/gadget/uvc_v4l2.c
parent[media] V4L: ov9740: Add suspend/resume (diff)
downloadlinux-523f46d6aba9dcb0a2d0fc474ca884e93a7cf198.tar.xz
linux-523f46d6aba9dcb0a2d0fc474ca884e93a7cf198.zip
[media] v4l2-events/fh: merge v4l2_events into v4l2_fh
Drivers that supported events used to be rare, but now that controls can also raise events this will become much more common since almost all drivers have controls. This means that keeping struct v4l2_events as a separate struct make no more sense. Merging it into struct v4l2_fh simplifies things substantially as it is now an integral part of the filehandle struct. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/usb/gadget/uvc_v4l2.c')
-rw-r--r--drivers/usb/gadget/uvc_v4l2.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/usb/gadget/uvc_v4l2.c b/drivers/usb/gadget/uvc_v4l2.c
index 5e807f083bc8..55828705d859 100644
--- a/drivers/usb/gadget/uvc_v4l2.c
+++ b/drivers/usb/gadget/uvc_v4l2.c
@@ -130,13 +130,7 @@ uvc_v4l2_open(struct file *file)
if (handle == NULL)
return -ENOMEM;
- ret = v4l2_fh_init(&handle->vfh, vdev);
- if (ret < 0)
- goto error;
-
- ret = v4l2_event_init(&handle->vfh);
- if (ret < 0)
- goto error;
+ v4l2_fh_init(&handle->vfh, vdev);
ret = v4l2_event_alloc(&handle->vfh, 8);
if (ret < 0)
@@ -354,7 +348,7 @@ uvc_v4l2_poll(struct file *file, poll_table *wait)
struct uvc_file_handle *handle = to_uvc_file_handle(file->private_data);
unsigned int mask = 0;
- poll_wait(file, &handle->vfh.events->wait, wait);
+ poll_wait(file, &handle->vfh.wait, wait);
if (v4l2_event_pending(&handle->vfh))
mask |= POLLPRI;