Skip to contentSkip to conversation

MIPS: Use device_type helpers to access the node type

PATCH Applied Rob Herring 2 participants 2 messages Nov 16, 2018 – Nov 19, 2018 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 arch/mips/pci/pci-rt3883.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
arch/mips/pci/pci-rt3883.c +2 -4
index 958899ffe99c..bafbf69e7dc4 100644
@@ -445,8 +445,7 @@ static int rt3883_pci_probe(struct platform_device *pdev)
 
 	/* find the PCI host bridge child node */
 	for_each_child_of_node(np, child) {
-		if (child->type &&
-		    of_node_cmp(child->type, "pci") == 0) {
+		if (of_node_is_type(child, "pci")) {
 			rpc->pci_controller.of_node = child;
 			break;
 		}
@@ -464,8 +463,7 @@ static int rt3883_pci_probe(struct platform_device *pdev)
 	for_each_available_child_of_node(rpc->pci_controller.of_node, child) {
 		int devfn;
 
-		if (!child->type ||
-		    of_node_cmp(child->type, "pci") != 0)
+		if (!of_node_is_type(child, "pci"))
 			continue;
 
 		devfn = of_pci_get_devfn(child);
Signature · 1 line
2.19.1
Applied
#1 lore raw

Hello,

Quoted 8 lines · Rob Herring

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

Applied to mips-next.

Thanks,
Paul

[ This message was auto-generated; if you believe anything is incorrect
then please email [email protected] to report it. ]