summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/of_device_32.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2018-11-16 15:06:59 -0600
committerDavid S. Miller <davem@davemloft.net>2018-11-18 13:35:21 -0800
commit88ca0557a01386834cbb59d5fc43041e810cbc69 (patch)
tree52b03e8f6b668ed89277548d2c0f895e4c5d82ed /arch/sparc/kernel/of_device_32.c
parent29c990dfc77c58b21a0f2ff4640b6a26955d0661 (diff)
downloadlinux-0-day-88ca0557a01386834cbb59d5fc43041e810cbc69.tar.gz
linux-0-day-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.c4
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 dc5b1b0ec6595..ee4841a960583 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,