lkml.org 
[lkml]   [2011]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 4/4] ARM: at91/dma: DMA controller registering with DT support
On Wed, Oct 12, 2011 at 06:57:14PM +0200, Nicolas Ferre wrote:
> Device tree support on at91sam9g45 family SoC. Only call
> platform_device_register() if no dma-controller node is
> found in device tree.
>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Acked-by: Grant Likely <grant.likely@secretlab.ca>

> ---
> arch/arm/mach-at91/at91sam9g45_devices.c | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
> index c9b897f..b9888c5 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 *of_node =
> + of_find_node_by_name(NULL, "dma-controller");
> +
> + if (of_node)
> + of_node_put(of_node);
> + else
> + platform_device_register(&at_hdmac_device);
> }
> #else
> void __init at91_add_device_hdmac(void) {}
> --
> 1.7.5.4
>


\
 
 \ /
  Last update: 2011-10-13 04:29    [W:0.172 / U:0.900 seconds]
©2003-2014 Jasper Spaans. Advertise on this site