[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1425825653-14768-5-git-send-email-prabhakar.csengg@gmail.com>
Date: Sun, 8 Mar 2015 14:40:40 +0000
From: Lad Prabhakar <prabhakar.csengg@...il.com>
To: Scott Jiang <scott.jiang.linux@...il.com>,
linux-media@...r.kernel.org, Hans Verkuil <hverkuil@...all.nl>
Cc: adi-buildroot-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org,
"Lad, Prabhakar" <prabhakar.csengg@...il.com>
Subject: [PATCH v4 04/17] media: blackfin: bfin_capture: set vb2 buffer field
From: "Lad, Prabhakar" <prabhakar.csengg@...il.com>
set the vb2 buffer field in buf_prepare() callback,
alongside drop local variable buf as we already have
a pointer to vb2 buffer.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@...il.com>
Acked-by: Scott Jiang <scott.jiang.linux@...il.com>
Tested-by: Scott Jiang <scott.jiang.linux@...il.com>
---
drivers/media/platform/blackfin/bfin_capture.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/media/platform/blackfin/bfin_capture.c b/drivers/media/platform/blackfin/bfin_capture.c
index 332f8c9..a588129 100644
--- a/drivers/media/platform/blackfin/bfin_capture.c
+++ b/drivers/media/platform/blackfin/bfin_capture.c
@@ -305,16 +305,16 @@ static int bcap_queue_setup(struct vb2_queue *vq,
static int bcap_buffer_prepare(struct vb2_buffer *vb)
{
struct bcap_device *bcap_dev = vb2_get_drv_priv(vb->vb2_queue);
- struct bcap_buffer *buf = to_bcap_vb(vb);
- unsigned long size;
+ unsigned long size = bcap_dev->fmt.sizeimage;
- size = bcap_dev->fmt.sizeimage;
if (vb2_plane_size(vb, 0) < size) {
v4l2_err(&bcap_dev->v4l2_dev, "buffer too small (%lu < %lu)\n",
vb2_plane_size(vb, 0), size);
return -EINVAL;
}
- vb2_set_plane_payload(&buf->vb, 0, size);
+ vb2_set_plane_payload(vb, 0, size);
+
+ vb->v4l2_buf.field = bcap_dev->fmt.field;
return 0;
}
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists