From patchwork Mon Feb 14 12:21:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 554871 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1ECM9Sl028887 for ; Mon, 14 Feb 2011 12:22:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754363Ab1BNMVz (ORCPT ); Mon, 14 Feb 2011 07:21:55 -0500 Received: from perceval.ideasonboard.com ([95.142.166.194]:58187 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754249Ab1BNMVu (ORCPT ); Mon, 14 Feb 2011 07:21:50 -0500 Received: from localhost.localdomain (unknown [91.178.218.226]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BDE2A35CAD; Mon, 14 Feb 2011 12:21:34 +0000 (UTC) From: Laurent Pinchart To: linux-media@vger.kernel.org, linux-omap@vger.kernel.org Cc: sakari.ailus@maxwell.research.nokia.com Subject: [PATCH v6 04/10] omap2: Fix camera resources for multiomap Date: Mon, 14 Feb 2011 13:21:31 +0100 Message-Id: <1297686097-9804-5-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1297686097-9804-1-git-send-email-laurent.pinchart@ideasonboard.com> References: <1297686097-9804-1-git-send-email-laurent.pinchart@ideasonboard.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 14 Feb 2011 12:22:12 +0000 (UTC) diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 4cf48ea..5d844bd 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[] = { @@ -158,6 +149,14 @@ int omap3_init_camera(void *pdata) } EXPORT_SYMBOL_GPL(omap3_init_camera); +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