From patchwork Fri Nov 12 21:18:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aguirre Rodriguez, Sergio Alberto" X-Patchwork-Id: 4865 Return-path: Envelope-to: mchehab@pedra Delivery-date: Fri, 12 Nov 2010 19:19:18 -0200 Received: from mchehab by pedra with local (Exim 4.72) (envelope-from ) id 1PH11i-0000KW-6W for mchehab@pedra; Fri, 12 Nov 2010 19:19:18 -0200 Received: from casper.infradead.org [85.118.1.10] by pedra with IMAP (fetchmail-6.3.17) for (single-drop); Fri, 12 Nov 2010 19:19:18 -0200 (BRST) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1PH11F-0006J0-T6; Fri, 12 Nov 2010 21:18:50 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757275Ab0KLVSh (ORCPT + 1 other); Fri, 12 Nov 2010 16:18:37 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:49847 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756991Ab0KLVSf (ORCPT ); Fri, 12 Nov 2010 16:18:35 -0500 Received: from dlep33.itg.ti.com ([157.170.170.112]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id oACLI5sj032131 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 Nov 2010 15:18:26 -0600 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id oACLI59q021440; Fri, 12 Nov 2010 15:18:05 -0600 (CST) Received: from localhost (dtx0091359-ubuntu-1.am.dhcp.ti.com [128.247.79.64]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id oACLI5f17991; Fri, 12 Nov 2010 15:18:05 -0600 (CST) From: Sergio Aguirre To: Laurent Pinchart Cc: linux-media@vger.kernel.org, Sergio Aguirre Subject: [omap3isp RFC][PATCH 03/10] omap3: Fix camera resources for multiomap Date: Fri, 12 Nov 2010 15:18:06 -0600 Message-Id: <1289596693-27660-4-git-send-email-saaguirre@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1289596693-27660-1-git-send-email-saaguirre@ti.com> References: <1289596693-27660-1-git-send-email-saaguirre@ti.com> Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: Signed-off-by: Sergio Aguirre --- arch/arm/mach-omap2/devices.c | 27 ++++++++++++--------------- 1 files changed, 12 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index c2275d3..c9fc732 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,19 +50,15 @@ 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, }; +#endif -static inline void omap_init_camera(void) -{ - platform_device_register(&omap_cam_device); -} - -#elif defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE) +#if defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE) static struct resource omap3isp_resources[] = { { @@ -165,15 +161,16 @@ struct platform_device omap3isp_device = { }, }; EXPORT_SYMBOL_GPL(omap3isp_device); +#endif static inline void omap_init_camera(void) { -} -#else -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)