Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 851c52b2 authored by Nicolas Ferre's avatar Nicolas Ferre
Browse files

ARM: at91/dma: DMA controller registering with DT support



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: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent b9eaa81a
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -64,6 +64,14 @@ static struct platform_device at_hdmac_device = {

void __init at91_add_device_hdmac(void)
{
#if defined(CONFIG_OF)
	struct device_node *of_node =
		of_find_node_by_name(NULL, "dma-controller");

	if (of_node)
		of_node_put(of_node);
	else
#endif
		platform_device_register(&at_hdmac_device);
}
#else