From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753158AbaESG1m (ORCPT ); Mon, 19 May 2014 02:27:42 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:36833 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753138AbaESG1k (ORCPT ); Mon, 19 May 2014 02:27:40 -0400 Date: Mon, 19 May 2014 08:27:22 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Emil Goode Cc: Shawn Guo , kernel@pengutronix.de, Russell King , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Greg Kroah-Hartman , Vinod Koul , Dan Williams Subject: Re: [PATCH 2/2] ARM: imx: convert camera init to use platform_device_register_full() Message-ID: <20140519062722.GE16662@pengutronix.de> References: <1400446261-27085-1-git-send-email-emilgoode@gmail.com> <1400446261-27085-3-git-send-email-emilgoode@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1400446261-27085-3-git-send-email-emilgoode@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2001:6f8:1178:2:5054:ff:fec0:8e10 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Emil, thanks for your effort. On Sun, May 18, 2014 at 10:51:00PM +0200, Emil Goode wrote: > This converts the imx camera allocation and initialization functions > to use platform_device_register_full() thus simplifying the code. > > Signed-off-by: Emil Goode > --- > Only build tested, unfortunately I currently don't have the hardware. > > arch/arm/mach-imx/devices/platform-ipu-core.c | 43 +++++++++---------------- > arch/arm/mach-imx/mach-mx31_3ds.c | 5 ++- > arch/arm/mach-imx/mach-mx31moboard.c | 6 ++-- > arch/arm/mach-imx/mach-mx35_3ds.c | 5 ++- > arch/arm/mach-imx/mach-pcm037.c | 5 ++- > 5 files changed, 23 insertions(+), 41 deletions(-) > > diff --git a/arch/arm/mach-imx/devices/platform-ipu-core.c b/arch/arm/mach-imx/devices/platform-ipu-core.c > index 6bd7c3f..13ea542 100644 > --- a/arch/arm/mach-imx/devices/platform-ipu-core.c > +++ b/arch/arm/mach-imx/devices/platform-ipu-core.c > @@ -69,42 +69,29 @@ struct platform_device *__init imx_alloc_mx3_camera( IMHO you should better rename the function because now it doesn't only allocate the device, but also registers it. Also I doubt that it's OK to call dma_declare_coherent_memory after the device is added. In this case maybe extend platform_device_register_full? And also add a warning to dma_declare_coherent_memory if it is called for an already added device? (Added a few people to Cc: that might be able to comment this. I don't even know if there is a reliable way to check if a device is already added.) Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |