aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/soc_camera.c
diff options
context:
space:
mode:
authorPaulius Zaleckas <paulius.zaleckas@teltonika.lt>2008-07-11 19:50:31 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 06:25:17 -0400
commit092d3921195c4553a1818e698cee7a281ab361f4 (patch)
treedc888fdf713a8b4736b622be9e5b94ec23c76872 /drivers/media/video/soc_camera.c
parent439d0e4250b6fc9df3fc9183db38cf8a23d4ad93 (diff)
V4L/DVB (8337): soc_camera: make videobuf independent
Makes SoC camera videobuf independent. Includes all necessary changes for PXA camera driver (currently the only driver using soc_camera in the mainline). These changes are important for the future soc_camera based drivers. Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/soc_camera.c')
-rw-r--r--drivers/media/video/soc_camera.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c
index 8ae2d9916d9f..38a89f133164 100644
--- a/drivers/media/video/soc_camera.c
+++ b/drivers/media/video/soc_camera.c
@@ -26,6 +26,7 @@
26 26
27#include <media/v4l2-common.h> 27#include <media/v4l2-common.h>
28#include <media/v4l2-dev.h> 28#include <media/v4l2-dev.h>
29#include <media/videobuf-core.h>
29#include <media/soc_camera.h> 30#include <media/soc_camera.h>
30 31
31static LIST_HEAD(hosts); 32static LIST_HEAD(hosts);
@@ -233,11 +234,7 @@ static int soc_camera_open(struct inode *inode, struct file *file)
233 file->private_data = icf; 234 file->private_data = icf;
234 dev_dbg(&icd->dev, "camera device open\n"); 235 dev_dbg(&icd->dev, "camera device open\n");
235 236
236 /* We must pass NULL as dev pointer, then all pci_* dma operations 237 ici->ops->init_videobuf(&icf->vb_vidq, icf->lock, icd);
237 * transform to normal dma_* ones. */
238 videobuf_queue_sg_init(&icf->vb_vidq, ici->vbq_ops, NULL, icf->lock,
239 V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_NONE,
240 ici->msize, icd);
241 238
242 return 0; 239 return 0;
243 240
@@ -787,7 +784,7 @@ int soc_camera_host_register(struct soc_camera_host *ici)
787 int ret; 784 int ret;
788 struct soc_camera_host *ix; 785 struct soc_camera_host *ix;
789 786
790 if (!ici->vbq_ops || !ici->ops->add || !ici->ops->remove) 787 if (!ici->ops->init_videobuf || !ici->ops->add || !ici->ops->remove)
791 return -EINVAL; 788 return -EINVAL;
792 789
793 /* Number might be equal to the platform device ID */ 790 /* Number might be equal to the platform device ID */