powerpc: 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.

Replace the open coded iterating over child nodes with
for_each_child_of_node() while we're here.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Rob Herring 2018-11-16 16:11:00 -06:00 committed by Michael Ellerman
parent 5b8d6be7b8
commit e5480bdcc4
18 changed files with 44 additions and 67 deletions

View file

@ -687,7 +687,7 @@ int check_legacy_ioport(unsigned long base_port)
return ret;
parent = of_get_parent(np);
if (parent) {
if (strcmp(parent->type, "isa") == 0)
if (of_node_is_type(parent, "isa"))
ret = 0;
of_node_put(parent);
}