sparc: 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. 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
29c990dfc7
commit
88ca0557a0
@@ -22,7 +22,7 @@
|
||||
|
||||
static int of_bus_pci_match(struct device_node *np)
|
||||
{
|
||||
if (!strcmp(np->type, "pci") || !strcmp(np->type, "pciex")) {
|
||||
if (of_node_is_type(np, "pci") || of_node_is_type(np, "pciex")) {
|
||||
/* Do not do PCI specific frobbing if the
|
||||
* PCI bridge lacks a ranges property. We
|
||||
* want to pass it through up to the next
|
||||
@@ -107,7 +107,7 @@ static unsigned long of_bus_sbus_get_flags(const u32 *addr, unsigned long flags)
|
||||
|
||||
static int of_bus_ambapp_match(struct device_node *np)
|
||||
{
|
||||
return !strcmp(np->type, "ambapp");
|
||||
return of_node_is_type(np, "ambapp");
|
||||
}
|
||||
|
||||
static void of_bus_ambapp_count_cells(struct device_node *child,
|
||||
|
Reference in New Issue
Block a user