sparc: 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" <davem@davemloft.net> Cc: sparclinux@vger.kernel.org Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
ead1c2bded
commit
29c990dfc7
@@ -283,7 +283,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
|
||||
sd->stc = &pbm->stc;
|
||||
sd->numa_node = pbm->numa_node;
|
||||
|
||||
if (!strcmp(node->name, "ebus"))
|
||||
if (of_node_name_eq(node, "ebus"))
|
||||
of_propagate_archdata(op);
|
||||
|
||||
type = of_get_property(node, "device_type", NULL);
|
||||
@@ -336,7 +336,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
|
||||
dev->error_state = pci_channel_io_normal;
|
||||
dev->dma_mask = 0xffffffff;
|
||||
|
||||
if (!strcmp(node->name, "pci")) {
|
||||
if (of_node_name_eq(node, "pci")) {
|
||||
/* a PCI-PCI bridge */
|
||||
dev->hdr_type = PCI_HEADER_TYPE_BRIDGE;
|
||||
dev->rom_base_reg = PCI_ROM_ADDRESS1;
|
||||
|
Reference in New Issue
Block a user