]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
PCI: Use of_node_name_eq() for node name comparisons
authorRob Herring <robh@kernel.org>
Wed, 5 Dec 2018 19:50:34 +0000 (13:50 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 22 Jan 2019 20:13:02 +0000 (14:13 -0600)
Convert string compares of DT node names to use of_node_name_eq() helper
instead.  This removes direct access to the node name pointer.

Signed-off-by: Rob Herring <robh@kernel.org>
[bhelgaas: drop similar rpaphp_core.c change to avoid merge conflict]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/of.c

index 4c4217d0c3f1f28d47ef901cf65695d2fcad2810..3d32da15c215d039d4c9b01d830c48460305d1df 100644 (file)
@@ -113,7 +113,7 @@ struct device_node *of_pci_find_child_device(struct device_node *parent,
                 * a fake root for all functions of a multi-function
                 * device we go down them as well.
                 */
-               if (!strcmp(node->name, "multifunc-device")) {
+               if (of_node_name_eq(node, "multifunc-device")) {
                        for_each_child_of_node(node, node2) {
                                if (__of_pci_pci_compare(node2, devfn)) {
                                        of_node_put(node);