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

Commit 1ddeaa51 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "coresight: Add ports and port child node check in get_ports function"

parents c28abd88 fd806f70
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012, 2017-2019 The Linux Foundation. All rights reserved.
/* Copyright (c) 2012, 2017-2020 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -57,6 +57,13 @@ static void of_coresight_get_ports(const struct device_node *node,
{
	struct device_node *ep = NULL;
	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);