Skip to content

Commit adc9fbc

Browse files
robherringbjorn-helgaas
authored andcommitted
PCI: 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. Link: https://lore.kernel.org/r/20200416215114.7715-1-robh@kernel.org Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au>
1 parent a6cec3f commit adc9fbc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/pci/hotplug/rpaphp_core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ static int rpaphp_drc_add_slot(struct device_node *dn)
435435
*/
436436
int rpaphp_add_slot(struct device_node *dn)
437437
{
438-
if (!dn->name || strcmp(dn->name, "pci"))
438+
if (!of_node_name_eq(dn, "pci"))
439439
return 0;
440440

441441
if (of_find_property(dn, "ibm,drc-info", NULL))

0 commit comments

Comments
 (0)