lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140519062722.GE16662@pengutronix.de>
Date:	Mon, 19 May 2014 08:27:22 +0200
From:	Uwe Kleine-König 
	<u.kleine-koenig@...gutronix.de>
To:	Emil Goode <emilgoode@...il.com>
Cc:	Shawn Guo <shawn.guo@...escale.com>, kernel@...gutronix.de,
	Russell King <linux@....linux.org.uk>,
	kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Vinod Koul <vinod.koul@...el.com>,
	Dan Williams <dan.j.williams@...el.com>
Subject: Re: [PATCH 2/2] ARM: imx: convert camera init to use
 platform_device_register_full()

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 <emilgoode@...il.com>
> ---
> 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/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ