From: Rob Herring Date: Thu, 16 Apr 2020 21:51:14 +0000 (-0500) Subject: PCI: Use of_node_name_eq() for node name comparisons X-Git-Tag: v5.10.7~2419^2~21^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=adc9fbcd7d04a711b765e8f7f5c2e07cbbac0f20;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Bjorn Helgaas Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman --- diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c index 6504869efabc..9887c9de08c3 100644 --- a/drivers/pci/hotplug/rpaphp_core.c +++ b/drivers/pci/hotplug/rpaphp_core.c @@ -435,7 +435,7 @@ static int rpaphp_drc_add_slot(struct device_node *dn) */ int rpaphp_add_slot(struct device_node *dn) { - if (!dn->name || strcmp(dn->name, "pci")) + if (!of_node_name_eq(dn, "pci")) return 0; if (of_find_property(dn, "ibm,drc-info", NULL))