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

MIPS: Use device_type helpers to access the node type

Remove directly accessing device_node.type pointer and use the accessors
instead. This will eventually allow removing the type pointer.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/21150/
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

authored by

Rob Herring and committed by
Paul Burton
49e510dd e4849aff

+2 -4
+2 -4
arch/mips/pci/pci-rt3883.c
··· 445 445 446 446 /* find the PCI host bridge child node */ 447 447 for_each_child_of_node(np, child) { 448 - if (child->type && 449 - of_node_cmp(child->type, "pci") == 0) { 448 + if (of_node_is_type(child, "pci")) { 450 449 rpc->pci_controller.of_node = child; 451 450 break; 452 451 } ··· 463 464 for_each_available_child_of_node(rpc->pci_controller.of_node, child) { 464 465 int devfn; 465 466 466 - if (!child->type || 467 - of_node_cmp(child->type, "pci") != 0) 467 + if (!of_node_is_type(child, "pci")) 468 468 continue; 469 469 470 470 devfn = of_pci_get_devfn(child);