Commit 862ab557 authored by Robin Murphy's avatar Robin Murphy Committed by Rob Herring

of/address: Introduce of_get_next_dma_parent() helper

Add of_get_next_dma_parent() helper which is similar to
__of_get_dma_parent(), but can be used in iterators and decrements the
ref count on the prior parent.
Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Tested-by: default avatarNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: default avatarNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 76dd7068
......@@ -695,6 +695,16 @@ static struct device_node *__of_get_dma_parent(const struct device_node *np)
return of_node_get(args.np);
}
static struct device_node *of_get_next_dma_parent(struct device_node *np)
{
struct device_node *parent;
parent = __of_get_dma_parent(np);
of_node_put(np);
return parent;
}
u64 of_translate_dma_address(struct device_node *dev, const __be32 *in_addr)
{
struct device_node *host;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment