diff options
author | Rob Herring <robh@kernel.org> | 2018-11-17 00:06:59 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-19 00:35:21 +0300 |
commit | 88ca0557a01386834cbb59d5fc43041e810cbc69 (patch) | |
tree | 52b03e8f6b668ed89277548d2c0f895e4c5d82ed /arch/sparc/kernel/of_device_32.c | |
parent | 29c990dfc77c58b21a0f2ff4640b6a26955d0661 (diff) | |
download | linux-88ca0557a01386834cbb59d5fc43041e810cbc69.tar.xz |
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>
Diffstat (limited to 'arch/sparc/kernel/of_device_32.c')
-rw-r--r-- | arch/sparc/kernel/of_device_32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/kernel/of_device_32.c b/arch/sparc/kernel/of_device_32.c index dc5b1b0ec659..ee4841a96058 100644 --- a/arch/sparc/kernel/of_device_32.c +++ b/arch/sparc/kernel/of_device_32.c @@ -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, |