[media] ARM mx3_camera: check for DMA engine type
authorSascha Hauer <s.hauer@pengutronix.de>
Fri, 5 Nov 2010 09:26:03 +0000 (06:26 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 9 Nov 2010 17:07:28 +0000 (15:07 -0200)
We have two dma engines in MX3 systems: The IPU and the SDMA
engine. We have to check if we got a channel from the correct
engine before proceeding with a channel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/mx3_camera.c

index 29c5fc3481331eb7055dff25f09a90cfc52709b9..aa871c2936b31d9bb821067932f2103889392539 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <mach/ipu.h>
 #include <mach/mx3_camera.h>
+#include <mach/dma.h>
 
 #define MX3_CAM_DRV_NAME "mx3-camera"
 
@@ -638,6 +639,9 @@ static bool chan_filter(struct dma_chan *chan, void *arg)
        struct dma_chan_request *rq = arg;
        struct mx3_camera_pdata *pdata;
 
+       if (!imx_dma_is_ipu(chan))
+               return false;
+
        if (!rq)
                return false;