aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/pwc/pwc-if.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/usb/pwc/pwc-if.c')
-rw-r--r--drivers/media/usb/pwc/pwc-if.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c
index abf365ab025d..84a6720b1d00 100644
--- a/drivers/media/usb/pwc/pwc-if.c
+++ b/drivers/media/usb/pwc/pwc-if.c
@@ -614,17 +614,20 @@ static int buffer_prepare(struct vb2_buffer *vb)
614 return 0; 614 return 0;
615} 615}
616 616
617static int buffer_finish(struct vb2_buffer *vb) 617static void buffer_finish(struct vb2_buffer *vb)
618{ 618{
619 struct pwc_device *pdev = vb2_get_drv_priv(vb->vb2_queue); 619 struct pwc_device *pdev = vb2_get_drv_priv(vb->vb2_queue);
620 struct pwc_frame_buf *buf = container_of(vb, struct pwc_frame_buf, vb); 620 struct pwc_frame_buf *buf = container_of(vb, struct pwc_frame_buf, vb);
621 621
622 /* 622 if (vb->state == VB2_BUF_STATE_DONE) {
623 * Application has called dqbuf and is getting back a buffer we've 623 /*
624 * filled, take the pwc data we've stored in buf->data and decompress 624 * Application has called dqbuf and is getting back a buffer
625 * it into a usable format, storing the result in the vb2_buffer 625 * we've filled, take the pwc data we've stored in buf->data
626 */ 626 * and decompress it into a usable format, storing the result
627 return pwc_decompress(pdev, buf); 627 * in the vb2_buffer.
628 */
629 pwc_decompress(pdev, buf);
630 }
628} 631}
629 632
630static void buffer_cleanup(struct vb2_buffer *vb) 633static void buffer_cleanup(struct vb2_buffer *vb)
@@ -1001,7 +1004,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
1001 pdev->vb_queue.buf_struct_size = sizeof(struct pwc_frame_buf); 1004 pdev->vb_queue.buf_struct_size = sizeof(struct pwc_frame_buf);
1002 pdev->vb_queue.ops = &pwc_vb_queue_ops; 1005 pdev->vb_queue.ops = &pwc_vb_queue_ops;
1003 pdev->vb_queue.mem_ops = &vb2_vmalloc_memops; 1006 pdev->vb_queue.mem_ops = &vb2_vmalloc_memops;
1004 pdev->vb_queue.timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; 1007 pdev->vb_queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
1005 rc = vb2_queue_init(&pdev->vb_queue); 1008 rc = vb2_queue_init(&pdev->vb_queue);
1006 if (rc < 0) { 1009 if (rc < 0) {
1007 PWC_ERROR("Oops, could not initialize vb2 queue.\n"); 1010 PWC_ERROR("Oops, could not initialize vb2 queue.\n");