aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorOhad Ben-Cohen <ohad@wizery.com>2012-01-11 08:28:11 -0500
committerJoerg Roedel <joerg.roedel@amd.com>2012-01-16 05:49:47 -0500
commit1a51a0ce174ddc0b0c11b6a0dbd179d95020e80b (patch)
treeb30ece8d9230bf47f7ed552986e24187b3e0e3a6 /arch/arm/mach-omap2
parentf93ea733878733f3e98475bc3e2ccf789bebcfb8 (diff)
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 <torvalds@linux-foundation.org> 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 <govindraj.raja@ti.com> Reported-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Cc: Tony Lindgren <tony@atomide.com> Cc: Joerg Roedel <Joerg.Roedel@amd.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/devices.c14
1 files changed, 13 insertions, 1 deletions
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 @@
28#include <plat/board.h> 28#include <plat/board.h>
29#include <plat/mcbsp.h> 29#include <plat/mcbsp.h>
30#include <plat/mmc.h> 30#include <plat/mmc.h>
31#include <plat/iommu.h>
32#include <plat/dma.h> 31#include <plat/dma.h>
33#include <plat/omap_hwmod.h> 32#include <plat/omap_hwmod.h>
34#include <plat/omap_device.h> 33#include <plat/omap_device.h>
@@ -128,6 +127,10 @@ static struct platform_device omap2cam_device = {
128}; 127};
129#endif 128#endif
130 129
130#if defined(CONFIG_IOMMU_API)
131
132#include <plat/iommu.h>
133
131static struct resource omap3isp_resources[] = { 134static struct resource omap3isp_resources[] = {
132 { 135 {
133 .start = OMAP3430_ISP_BASE, 136 .start = OMAP3430_ISP_BASE,
@@ -224,6 +227,15 @@ int omap3_init_camera(struct isp_platform_data *pdata)
224 return platform_device_register(&omap3isp_device); 227 return platform_device_register(&omap3isp_device);
225} 228}
226 229
230#else /* !CONFIG_IOMMU_API */
231
232int omap3_init_camera(struct isp_platform_data *pdata)
233{
234 return 0;
235}
236
237#endif
238
227static inline void omap_init_camera(void) 239static inline void omap_init_camera(void)
228{ 240{
229#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) 241#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)