[PATCH 5/6] v4l: of: use of_graph_get_remote_endpoint()

From: Kuninori Morimoto
Date: Thu Jan 19 2017 - 01:46:42 EST



From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>

Now, we can use of_graph_get_remote_endpoint(). Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
---
drivers/media/v4l2-core/v4l2-of.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/v4l2-core/v4l2-of.c b/drivers/media/v4l2-core/v4l2-of.c
index 93b3368..b2ed4b3 100644
--- a/drivers/media/v4l2-core/v4l2-of.c
+++ b/drivers/media/v4l2-core/v4l2-of.c
@@ -14,6 +14,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
+#include <linux/of_graph.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/types.h>
@@ -284,7 +285,7 @@ int v4l2_of_parse_link(const struct device_node *node,
np = of_get_next_parent(np);
link->local_node = np;

- np = of_parse_phandle(node, "remote-endpoint", 0);
+ np = of_graph_get_remote_endpoint(node);
if (!np) {
of_node_put(link->local_node);
return -ENOLINK;
--
1.9.1