From patchwork Tue Nov 17 22:04: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: 2083 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Tue, 17 Nov 2009 22:13:13 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra.chehab.org with IMAP (fetchmail-6.3.6) for (single-drop); Tue, 17 Nov 2009 20:16:02 -0200 (BRST) Received: from vger.kernel.org ([209.132.176.167]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1NAWIT-0007xv-3W; Tue, 17 Nov 2009 22:13:13 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756184AbZKQWMr (ORCPT + 1 other); Tue, 17 Nov 2009 17:12:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755504AbZKQWMr (ORCPT ); Tue, 17 Nov 2009 17:12:47 -0500 Received: from smtp-OUT05A.alice.it ([85.33.3.5]:1091 "EHLO smtp-OUT05A.alice.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756156AbZKQWMq (ORCPT ); Tue, 17 Nov 2009 17:12:46 -0500 Received: from FBCMMO02.fbc.local ([192.168.68.196]) by smtp-OUT05A.alice.it with Microsoft SMTPSVC(6.0.3790.3959); Tue, 17 Nov 2009 23:12:51 +0100 Received: from FBCMCL01B03.fbc.local ([192.168.69.84]) by FBCMMO02.fbc.local with Microsoft SMTPSVC(6.0.3790.3959); Tue, 17 Nov 2009 23:12:49 +0100 Received: from badebec ([79.2.139.137]) by FBCMCL01B03.fbc.local with Microsoft SMTPSVC(6.0.3790.3959); Tue, 17 Nov 2009 23:04:51 +0100 Received: by badebec with local (Exim 4.69) (envelope-from ) id 1NAWAD-0006mV-DC; Tue, 17 Nov 2009 23:04:41 +0100 From: Antonio Ospite To: linux-media@vger.kernel.org Cc: Antonio Ospite , Guennadi Liakhovetski , Eric Miao , linux-arm-kernel@lists.infradead.org, Mike Rapoport , Juergen Beisert , Robert Jarzmik Subject: [PATCH 3/3] pxa_camera: remove init() callback Date: Tue, 17 Nov 2009 23:04:23 +0100 Message-Id: <1258495463-26029-4-git-send-email-ospite@studenti.unina.it> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1258495463-26029-1-git-send-email-ospite@studenti.unina.it> References: <1258495463-26029-1-git-send-email-ospite@studenti.unina.it> X-OriginalArrivalTime: 17 Nov 2009 22:04:51.0659 (UTC) FILETIME=[FC8FD1B0:01CA67D1] Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org pxa_camera init() callback is sometimes abused to setup MFP for PXA CIF, or even to request GPIOs to be used by the camera *sensor*. These initializations can be performed statically in machine init functions. The current semantics for this init() callback is ambiguous anyways, it is invoked in pxa_camera_activate(), hence at device node open, but its users use it like a generic initialization to be done at module init time (configure MFP, request GPIOs for *sensor* control). Signed-off-by: Antonio Ospite --- arch/arm/mach-pxa/include/mach/camera.h | 2 -- drivers/media/video/pxa_camera.c | 10 ---------- 2 files changed, 0 insertions(+), 12 deletions(-) diff --git a/arch/arm/mach-pxa/include/mach/camera.h b/arch/arm/mach-pxa/include/mach/camera.h index 31abe6d..6709b1c 100644 --- a/arch/arm/mach-pxa/include/mach/camera.h +++ b/arch/arm/mach-pxa/include/mach/camera.h @@ -35,8 +35,6 @@ #define PXA_CAMERA_VSP 0x400 struct pxacamera_platform_data { - int (*init)(struct device *); - unsigned long flags; unsigned long mclk_10khz; }; diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index 51b683c..49f2bf9 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c @@ -882,18 +882,8 @@ static void recalculate_fifo_timeout(struct pxa_camera_dev *pcdev, static void pxa_camera_activate(struct pxa_camera_dev *pcdev) { - struct pxacamera_platform_data *pdata = pcdev->pdata; - struct device *dev = pcdev->soc_host.v4l2_dev.dev; u32 cicr4 = 0; - dev_dbg(dev, "Registered platform device at %p data %p\n", - pcdev, pdata); - - if (pdata && pdata->init) { - dev_dbg(dev, "%s: Init gpios\n", __func__); - pdata->init(dev); - } - /* disable all interrupts */ __raw_writel(0x3ff, pcdev->base + CICR0);