Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Rob Herring and committed by
Bjorn Helgaas
adc9fbcd a6cec3fd

+1 -1
+1 -1
drivers/pci/hotplug/rpaphp_core.c
··· 435 435 */ 436 436 int rpaphp_add_slot(struct device_node *dn) 437 437 { 438 - if (!dn->name || strcmp(dn->name, "pci")) 438 + if (!of_node_name_eq(dn, "pci")) 439 439 return 0; 440 440 441 441 if (of_find_property(dn, "ibm,drc-info", NULL))