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:

committed by
David S. Miller

parent
ead1c2bded
commit
29c990dfc7
@@ -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 = ¢ral_op->resource[5];
|
||||
} else if (!strcmp(dp->name, "zs")) {
|
||||
} else if (of_node_name_eq(dp, "zs")) {
|
||||
res = ¢ral_op->resource[4];
|
||||
} else if (!strcmp(dp->name, "clock-board")) {
|
||||
} else if (of_node_name_eq(dp, "clock-board")) {
|
||||
res = ¢ral_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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user