aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Herring <[email protected]>2018-12-05 13:50:25 -0600
committerDavid S. Miller <[email protected]>2018-12-05 20:57:56 -0800
commitadf040ddd00152bda99aa9bc2afef9075ac88b34 (patch)
tree6ad371cd36a5fb7e317ed30e801d24964ceba620
parentcf76c364a1e1e5224af80edf70a1e3023e1fcf8c (diff)
ide: 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" <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Rob Herring <[email protected]> Signed-off-by: David S. Miller <[email protected]>
-rw-r--r--drivers/ide/pmac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c
index 203ed4adc04a..92f840365718 100644
--- a/drivers/ide/pmac.c
+++ b/drivers/ide/pmac.c
@@ -1046,7 +1046,7 @@ static int pmac_ide_setup_device(pmac_ide_hwif_t *pmif, struct ide_hw *hw)
d.port_ops = &pmac_ide_ata4_port_ops;
d.udma_mask = ATA_UDMA5;
} else if (of_device_is_compatible(np, "keylargo-ata")) {
- if (strcmp(np->name, "ata-4") == 0) {
+ if (of_node_name_eq(np, "ata-4")) {
pmif->kind = controller_kl_ata4;
d.port_ops = &pmac_ide_ata4_port_ops;
d.udma_mask = ATA_UDMA4;