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

@@ -725,11 +725,11 @@ static unsigned int central_build_irq(struct device_node *dp,
unsigned long imap, iclr;
u32 tmp;
if (!strcmp(dp->name, "eeprom")) {
if (of_node_name_eq(dp, "eeprom")) {
res = &central_op->resource[5];
} else if (!strcmp(dp->name, "zs")) {
} else if (of_node_name_eq(dp, "zs")) {
res = &central_op->resource[4];
} else if (!strcmp(dp->name, "clock-board")) {
} else if (of_node_name_eq(dp, "clock-board")) {
res = &central_op->resource[3];
} else {
return ino;
@@ -824,19 +824,19 @@ void __init irq_trans_init(struct device_node *dp)
}
#endif
#ifdef CONFIG_SBUS
if (!strcmp(dp->name, "sbus") ||
!strcmp(dp->name, "sbi")) {
if (of_node_name_eq(dp, "sbus") ||
of_node_name_eq(dp, "sbi")) {
sbus_irq_trans_init(dp);
return;
}
#endif
if (!strcmp(dp->name, "fhc") &&
!strcmp(dp->parent->name, "central")) {
if (of_node_name_eq(dp, "fhc") &&
of_node_name_eq(dp->parent, "central")) {
central_irq_trans_init(dp);
return;
}
if (!strcmp(dp->name, "virtual-devices") ||
!strcmp(dp->name, "niu")) {
if (of_node_name_eq(dp, "virtual-devices") ||
of_node_name_eq(dp, "niu")) {
sun4v_vdev_irq_trans_init(dp);
return;
}