]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
V4L/DVB: mx2_camera: fix for list bufnum in frame_done_emma
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Tue, 3 Aug 2010 09:37:54 +0000 (06:37 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 9 Aug 2010 02:43:03 +0000 (23:43 -0300)
The emma uses bufnum 1 and 0. This patch tells the bufqueue to change
the next buffer to the next one and not the current one.
Otherwise the BUG_ON above will trigger everytime.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/mx2_camera.c

index 026bef0ba403d1e855f804ebfd8287f2902ceff7..8441ecac6b182c7d32df6339862e6b083744a42f 100644 (file)
@@ -1201,7 +1201,7 @@ static void mx27_camera_frame_done_emma(struct mx2_camera_dev *pcdev,
        buf = list_entry(pcdev->capture.next,
                        struct mx2_buffer, vb.queue);
 
-       buf->bufnum = bufnum;
+       buf->bufnum = !bufnum;
 
        list_move_tail(pcdev->capture.next, &pcdev->active_bufs);