[media] media/platform: convert drivers to use the new vb2_queue dev field
[linux.git] / drivers / media / platform / exynos4-is / fimc-capture.c
index bf47d3b9cbe77e5dce9b1955c8280070afb5e3d0..512b254914bcef49ff2a5a5baa75543b1bf5cb18 100644 (file)
@@ -354,11 +354,9 @@ static int queue_setup(struct vb2_queue *vq,
        if (*num_planes) {
                if (*num_planes != fmt->memplanes)
                        return -EINVAL;
-               for (i = 0; i < *num_planes; i++) {
+               for (i = 0; i < *num_planes; i++)
                        if (sizes[i] < (wh * fmt->depth[i]) / 8)
                                return -EINVAL;
-                       allocators[i] = ctx->fimc_dev->alloc_ctx;
-               }
                return 0;
        }
 
@@ -371,8 +369,6 @@ static int queue_setup(struct vb2_queue *vq,
                        sizes[i] = frame->payload[i];
                else
                        sizes[i] = max_t(u32, size, frame->payload[i]);
-
-               allocators[i] = ctx->fimc_dev->alloc_ctx;
        }
 
        return 0;
@@ -1779,6 +1775,7 @@ static int fimc_register_capture_device(struct fimc_dev *fimc,
        q->buf_struct_size = sizeof(struct fimc_vid_buffer);
        q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
        q->lock = &fimc->lock;
+       q->dev = &fimc->pdev->dev;
 
        ret = vb2_queue_init(q);
        if (ret)
This page took 0.026869 seconds and 4 git commands to generate.