sparc: Use of_node_name_eq for node name comparisons

Convert string compares of DT node names to use of_node_name_eq helper
instead. This removes direct access to the node name pointer.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Rob Herring
2018-11-16 15:06:58 -06:00
committed by David S. Miller
parent ead1c2bded
commit 29c990dfc7
14 changed files with 44 additions and 44 deletions

View File

@@ -335,8 +335,8 @@ static void __init __build_path_component(struct device_node *dp, char *tmp_buf)
ebus_path_component(dp, tmp_buf);
return;
}
if (!strcmp(parent->name, "usb") ||
!strcmp(parent->name, "hub")) {
if (of_node_name_eq(parent, "usb") ||
of_node_name_eq(parent, "hub")) {
usb_path_component(dp, tmp_buf);
return;
}