From 1a51a0ce174ddc0b0c11b6a0dbd179d95020e80b Mon Sep 17 00:00:00 2001 From: Ohad Ben-Cohen Date: Wed, 11 Jan 2012 15:28:11 +0200 Subject: [PATCH] ARM: OMAP3: fix build on !CONFIG_IOMMU_API omap3isp depends on CONFIG_IOMMU_API, so avoid registering its device (and defining its configuration structs) on !CONFIG_IOMMU_API. This is generally nice to have, but more importantly, it fixes: arch/arm/plat-omap/include/plat/iommu.h: In function 'dev_to_omap_iommu': arch/arm/plat-omap/include/plat/iommu.h:135: error: 'struct dev_archdata' has no member named 'iommu' arch/arm/mach-omap2/devices.c: In function 'omap3_init_camera': arch/arm/mach-omap2/devices.c:222: error: 'struct dev_archdata' has no member named 'iommu' make[1]: *** [arch/arm/mach-omap2/devices.o] Error 1 make: *** [arch/arm/mach-omap2] Error 2 Which happens because while setting up the omap3isp device we try to access the (now nonexistent) iommu member of dev_archdata. Compile tested with omap2plus_defconfig on today's: commit e343a895a9f342f239c5e3c5ffc6c0b1707e6244 Merge: 06792c4 193a667 Author: Linus Torvalds Date: Tue Jan 10 18:04:27 2012 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Reported-by: Govindraj Raja Reported-by: Arik Nemtsov Signed-off-by: Ohad Ben-Cohen Cc: Tony Lindgren Cc: Joerg Roedel Cc: Laurent Pinchart Acked-by: Laurent Pinchart Acked-by: Tony Lindgren Signed-off-by: Joerg Roedel --- arch/arm/mach-omap2/devices.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 9ceabf02eeb7..2794dba90870 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -128,6 +127,10 @@ static struct platform_device omap2cam_device = { }; #endif +#if defined(CONFIG_IOMMU_API) + +#include + static struct resource omap3isp_resources[] = { { .start = OMAP3430_ISP_BASE, @@ -224,6 +227,15 @@ int omap3_init_camera(struct isp_platform_data *pdata) return platform_device_register(&omap3isp_device); } +#else /* !CONFIG_IOMMU_API */ + +int omap3_init_camera(struct isp_platform_data *pdata) +{ + return 0; +} + +#endif + static inline void omap_init_camera(void) { #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)