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: <4E942581.2050903@ru.mvista.com>
Date:	Tue, 11 Oct 2011 15:16:17 +0400
From:	Sergei Shtylyov <sshtylyov@...mvista.com>
To:	Nicolas Ferre <nicolas.ferre@...el.com>
CC:	vinod.koul@...el.com, linux-arm-kernel@...ts.infradead.org,
	robherring2@...il.com, devicetree-discuss@...ts.ozlabs.org,
	grant.likely@...retlab.ca, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2 4/4] ARM: at91/dma: DMA controller registering with
 DT support

Hello.

On 10-10-2011 20:43, Nicolas Ferre wrote:

> Device tree support on at91sam9g45 family SoC. Only call
> platform_device_register() if no compatible dma-controller
> node is found in device tree.

> Signed-off-by: Nicolas Ferre<nicolas.ferre@...el.com>
> ---
> V2: use compatible string to match device.

[...]

> diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
> index 9390ae6..2120055 100644
> --- a/arch/arm/mach-at91/at91sam9g45_devices.c
> +++ b/arch/arm/mach-at91/at91sam9g45_devices.c
> @@ -64,7 +64,13 @@ static struct platform_device at_hdmac_device = {
>
>   void __init at91_add_device_hdmac(void)
>   {
> -	platform_device_register(&at_hdmac_device);
> +	struct device_node *np = of_find_node_by_name(NULL, "dma-controller");
> +
> +	if (np&&  of_device_is_compatible(np, "atmel,at91sam9g45-dma")) {
> +		of_node_put(np);
> +	} else {
> +		platform_device_register(&at_hdmac_device);
> +	}

    {} not needed here, and checkpatch.pl should have protested.

WBR, Sergei

--
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