summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorSergio Aguirre <saaguirre@ti.com>2010-11-15 15:29:54 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-22 08:53:43 +0100
commitcfe2cde6d33f15994ad34466ac4a08f5bb348948 (patch)
tree268ccc7ee2f2534d810b1c8705712636ecc12bea /arch/arm
parent[media] omap3: Add function to register omap3isp platform device structure (diff)
downloadlinux-cfe2cde6d33f15994ad34466ac4a08f5bb348948.tar.xz
linux-cfe2cde6d33f15994ad34466ac4a08f5bb348948.zip
[media] omap2: Fix camera resources for multiomap
Make sure the kernel can be compiled with both OMAP2 and OMAP3 camera support linked in, and give public symbols proper omap2/omap3 prefixes. Signed-off-by: Sergio Aguirre <saaguirre@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/devices.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 6fd92eb97048..145c8f0f6597 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -38,7 +38,7 @@
#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
-static struct resource cam_resources[] = {
+static struct resource omap2cam_resources[] = {
{
.start = OMAP24XX_CAMERA_BASE,
.end = OMAP24XX_CAMERA_BASE + 0xfff,
@@ -50,21 +50,12 @@ static struct resource cam_resources[] = {
}
};
-static struct platform_device omap_cam_device = {
+static struct platform_device omap2cam_device = {
.name = "omap24xxcam",
.id = -1,
- .num_resources = ARRAY_SIZE(cam_resources),
- .resource = cam_resources,
+ .num_resources = ARRAY_SIZE(omap2cam_resources),
+ .resource = omap2cam_resources,
};
-
-static inline void omap_init_camera(void)
-{
- platform_device_register(&omap_cam_device);
-}
-#else
-static inline void omap_init_camera(void)
-{
-}
#endif
static struct resource omap3isp_resources[] = {
@@ -157,6 +148,14 @@ int omap3_init_camera(struct isp_platform_data *pdata)
return platform_device_register(&omap3isp_device);
}
+static inline void omap_init_camera(void)
+{
+#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
+ if (cpu_is_omap24xx())
+ platform_device_register(&omap2cam_device);
+#endif
+}
+
#if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE)
#define MBOX_REG_SIZE 0x120