All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soc-camera: initialise videobuf immediately before allocating them
@ 2010-08-12 20:32 Guennadi Liakhovetski
  0 siblings, 0 replies; only message in thread
From: Guennadi Liakhovetski @ 2010-08-12 20:32 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Janusz Krzysztofik

Only the "streamer" process has to initialise videobufs.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---

Janusz, this and the following patch can be useful, if we decide to 
implement dynamic switching between videobuf implementations. Only 
compile-tested...

 drivers/media/video/soc_camera.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c
index a499cac..d90386c 100644
--- a/drivers/media/video/soc_camera.c
+++ b/drivers/media/video/soc_camera.c
@@ -158,6 +158,8 @@ static int soc_camera_reqbufs(struct file *file, void *priv,
 
 	WARN_ON(priv != file->private_data);
 
+	ici->ops->init_videobuf(&icf->vb_vidq, icd);
+
 	ret = videobuf_reqbufs(&icf->vb_vidq, p);
 	if (ret < 0)
 		return ret;
@@ -409,8 +411,6 @@ static int soc_camera_open(struct file *file)
 	file->private_data = icf;
 	dev_dbg(&icd->dev, "camera device open\n");
 
-	ici->ops->init_videobuf(&icf->vb_vidq, icd);
-
 	mutex_unlock(&icd->video_lock);
 
 	return 0;
-- 
1.7.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-08-12 20:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-12 20:32 [PATCH] soc-camera: initialise videobuf immediately before allocating them Guennadi Liakhovetski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.