summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/omap3isp/isp.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-04-09 05:48:01 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-04-20 10:52:56 -0400
commit243131134be4bf577647110d39c64fc406c608b0 (patch)
tree7c37c5112cfb67a6b4e36d145a9ca8724e99bc2d /drivers/media/platform/omap3isp/isp.c
parentba37e6dd017e1b8129707f225cb751ba3125db21 (diff)
downloadlinux-243131134be4bf577647110d39c64fc406c608b0.tar.bz2
media: omap3isp: Allow it to build with COMPILE_TEST
There aren't much things required for it to build with COMPILE_TEST. It just needs to not compile the code that depends on arm-specific iommu implementation. Co-developed-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/omap3isp/isp.c')
-rw-r--r--drivers/media/platform/omap3isp/isp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
index 9952f95cfe4a..f22cf351e3ee 100644
--- a/drivers/media/platform/omap3isp/isp.c
+++ b/drivers/media/platform/omap3isp/isp.c
@@ -61,7 +61,9 @@
#include <linux/sched.h>
#include <linux/vmalloc.h>
+#ifdef CONFIG_ARM_DMA_USE_IOMMU
#include <asm/dma-iommu.h>
+#endif
#include <media/v4l2-common.h>
#include <media/v4l2-fwnode.h>
@@ -1938,13 +1940,16 @@ error_csi2:
static void isp_detach_iommu(struct isp_device *isp)
{
+#ifdef CONFIG_ARM_DMA_USE_IOMMU
arm_iommu_detach_device(isp->dev);
arm_iommu_release_mapping(isp->mapping);
isp->mapping = NULL;
+#endif
}
static int isp_attach_iommu(struct isp_device *isp)
{
+#ifdef CONFIG_ARM_DMA_USE_IOMMU
struct dma_iommu_mapping *mapping;
int ret;
@@ -1973,6 +1978,9 @@ error:
arm_iommu_release_mapping(isp->mapping);
isp->mapping = NULL;
return ret;
+#else
+ return -ENODEV;
+#endif
}
/*