Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 352f5d25 authored by Janusz Krzysztofik's avatar Janusz Krzysztofik Committed by Mauro Carvalho Chehab
Browse files

[media] SoC Camera: OMAP1: update for recent framework changes



The recently added OMAP1 camera driver was not ready for one video queue per
device framework changes. Fix it.

Created and tested against linux-2.6.37-rc1.

Signed-off-by: default avatarJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent a8de6635
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -1386,7 +1386,7 @@ static void omap1_cam_init_videobuf(struct videobuf_queue *q,
	}
	}
}
}


static int omap1_cam_reqbufs(struct soc_camera_file *icf,
static int omap1_cam_reqbufs(struct soc_camera_device *icd,
			      struct v4l2_requestbuffers *p)
			      struct v4l2_requestbuffers *p)
{
{
	int i;
	int i;
@@ -1398,7 +1398,7 @@ static int omap1_cam_reqbufs(struct soc_camera_file *icf,
	 * it hadn't triggered
	 * it hadn't triggered
	 */
	 */
	for (i = 0; i < p->count; i++) {
	for (i = 0; i < p->count; i++) {
		struct omap1_cam_buf *buf = container_of(icf->vb_vidq.bufs[i],
		struct omap1_cam_buf *buf = container_of(icd->vb_vidq.bufs[i],
						      struct omap1_cam_buf, vb);
						      struct omap1_cam_buf, vb);
		buf->inwork = 0;
		buf->inwork = 0;
		INIT_LIST_HEAD(&buf->vb.queue);
		INIT_LIST_HEAD(&buf->vb.queue);
@@ -1485,10 +1485,10 @@ static int omap1_cam_set_bus_param(struct soc_camera_device *icd,


static unsigned int omap1_cam_poll(struct file *file, poll_table *pt)
static unsigned int omap1_cam_poll(struct file *file, poll_table *pt)
{
{
	struct soc_camera_file *icf = file->private_data;
	struct soc_camera_device *icd = file->private_data;
	struct omap1_cam_buf *buf;
	struct omap1_cam_buf *buf;


	buf = list_entry(icf->vb_vidq.stream.next, struct omap1_cam_buf,
	buf = list_entry(icd->vb_vidq.stream.next, struct omap1_cam_buf,
			 vb.stream);
			 vb.stream);


	poll_wait(file, &buf->vb.done, pt);
	poll_wait(file, &buf->vb.done, pt);