From patchwork Fri Nov 27 20:30:23 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Ospite X-Patchwork-Id: 63406 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nARKVrLZ006356 for ; Fri, 27 Nov 2009 20:31:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751174AbZK0Ubp (ORCPT ); Fri, 27 Nov 2009 15:31:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751076AbZK0Ubp (ORCPT ); Fri, 27 Nov 2009 15:31:45 -0500 Received: from smtp-out13.alice.it ([85.33.2.18]:1339 "EHLO smtp-out13.alice.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750738AbZK0Ubp (ORCPT ); Fri, 27 Nov 2009 15:31:45 -0500 Received: from fbcmmo06.fbc.local ([192.168.184.137]) by smtp-out13.alice.it with Microsoft SMTPSVC(6.0.3790.3959); Fri, 27 Nov 2009 21:31:48 +0100 Received: from FBCMCL01B03.fbc.local ([192.168.69.84]) by fbcmmo06.fbc.local with Microsoft SMTPSVC(6.0.3790.3959); Fri, 27 Nov 2009 21:31:03 +0100 Received: from badebec ([87.6.149.247]) by FBCMCL01B03.fbc.local with Microsoft SMTPSVC(6.0.3790.3959); Fri, 27 Nov 2009 21:31:02 +0100 Received: by badebec with local (Exim 4.69) (envelope-from ) id 1NE7Sz-0004OB-DI; Fri, 27 Nov 2009 21:30:57 +0100 From: Antonio Ospite To: linux-arm-kernel@lists.infradead.org Cc: Antonio Ospite , Linux Media Mailing List , Eric Miao , Mike Rapoport , Juergen Beisert , Robert Jarzmik Subject: [PATCH 1/3 v2] em-x270: don't use pxa_camera init() callback Date: Fri, 27 Nov 2009 21:30:23 +0100 Message-Id: <1259353823-16843-1-git-send-email-ospite@studenti.unina.it> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: References: X-Face: z*RaLf`X<@C75u6Ig9}{oW$H; 1_\2t5)({*|jhM/Vb; ]yA5\I~93>J<_`<4)A{':UrE X-OriginalArrivalTime: 27 Nov 2009 20:31:03.0052 (UTC) FILETIME=[89C80CC0:01CA6FA0] Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c index aec7f42..f71f34c 100644 --- a/arch/arm/mach-pxa/em-x270.c +++ b/arch/arm/mach-pxa/em-x270.c @@ -967,7 +967,7 @@ static inline void em_x270_init_gpio_keys(void) {} #if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE) static struct regulator *em_x270_camera_ldo; -static int em_x270_sensor_init(struct device *dev) +static int em_x270_sensor_init(void) { int ret; @@ -996,7 +996,6 @@ static int em_x270_sensor_init(struct device *dev) } struct pxacamera_platform_data em_x270_camera_platform_data = { - .init = em_x270_sensor_init, .flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 | PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN, .mclk_10khz = 2600, @@ -1049,8 +1048,10 @@ static struct platform_device em_x270_camera = { static void __init em_x270_init_camera(void) { - pxa_set_camera_info(&em_x270_camera_platform_data); - platform_device_register(&em_x270_camera); + if (em_x270_sensor_init() == 0) { + pxa_set_camera_info(&em_x270_camera_platform_data); + platform_device_register(&em_x270_camera); + } } #else static inline void em_x270_init_camera(void) {}