Merge "Add ports and port child node check in legacy function"

This commit is contained in:
qctecmdr 2020-05-15 20:31:11 -07:00 • committed by Gerrit - the friendly Code Review server
commit 89bc61bcc5

View file

@ -69,6 +69,13 @@ static void of_coresight_get_ports_legacy(const struct device_node *node,
struct device_node *ep = NULL;
struct of_endpoint endpoint;
int in = 0, out = 0;
struct device_node *ports = NULL, *port = NULL;
ports = of_get_child_by_name(node, "ports");
port = of_get_child_by_name(node, "port");
if (!ports && !port)
return;
do {
ep = of_graph_get_next_endpoint(node, ep);