mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 22:23:14 -04:00
Add ports and port child node check in legacy function
in get_ports_legacy function, if there is no ports and port child nodes of device node, just return to avoid unnecessary actions. Change-Id: Ie392f1fe8265cb3dba38ac687a0a1612e772a943 Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
This commit is contained in:
parent
0070b55b6b
commit
7f20d186d0
1 changed files with 7 additions and 0 deletions
|
|
@ -68,6 +68,13 @@ static void of_coresight_get_ports_legacy(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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue