From: Rob Herring <robh@kernel.org>
To: devicetree@vger.kernel.org, Michael Ellerman <mpe@ellerman.id.au>,
linuxppc-dev@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org,
Frank Rowand <frowand.list@gmail.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
David Laight <David.Laight@aculab.com>
Subject: [PATCH v2 2/5] powerpc: pseries: vio: match parent nodes with of_find_node_by_path
Date: Mon, 21 Aug 2017 10:16:48 -0500 [thread overview]
Message-ID: <20170821151651.25096-3-robh@kernel.org> (raw)
In-Reply-To: <20170821151651.25096-1-robh@kernel.org>
In preparation to remove the full path from device_node.full_name, use
of_find_node_by_path instead of open coding with strcmp.
Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
---
v2:
- rebased to linux-next and removed spurious change fro patch 1.
arch/powerpc/platforms/pseries/vio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/vio.c b/arch/powerpc/platforms/pseries/vio.c
index aa5ca74316fa..5754572deb23 100644
--- a/arch/powerpc/platforms/pseries/vio.c
+++ b/arch/powerpc/platforms/pseries/vio.c
@@ -1357,9 +1357,9 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node)
*/
parent_node = of_get_parent(of_node);
if (parent_node) {
- if (!strcmp(parent_node->full_name, "/ibm,platform-facilities"))
+ if (parent_node == of_find_node_by_path("/ibm,platform-facilities"))
family = PFO;
- else if (!strcmp(parent_node->full_name, "/vdevice"))
+ else if (parent_node == of_find_node_by_path("/vdevice"))
family = VDEVICE;
else {
pr_warn("%s: parent(%pOF) of %s not recognized.\n",
--
2.11.0
next prev parent reply other threads:[~2017-08-21 15:17 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-21 15:16 [PATCH v2 0/5] Removing full paths from DT full_name Rob Herring
2017-08-21 15:16 ` [PATCH v2 1/5] powerpc: Convert to using %pOF instead of full_name Rob Herring
2017-08-24 12:37 ` [v2,1/5] " Michael Ellerman
2017-08-21 15:16 ` Rob Herring [this message]
2017-08-22 5:12 ` [PATCH v2 2/5] powerpc: pseries: vio: match parent nodes with of_find_node_by_path Michael Ellerman
2017-08-24 18:08 ` Rob Herring
2017-08-25 0:10 ` Michael Ellerman
2017-08-21 15:16 ` [PATCH v2 3/5] powerpc: pseries: remove dlpar_attach_node dependency on full path Rob Herring
2017-08-24 12:37 ` [v2, " Michael Ellerman
2017-08-21 15:16 ` [PATCH v2 4/5] powerpc: pseries: only store the device node basename in full_name Rob Herring
2017-10-03 9:26 ` Michael Ellerman
2017-10-03 18:44 ` Rob Herring
2017-10-04 12:37 ` Michael Ellerman
2017-08-21 15:16 ` [PATCH v2 5/5] of/fdt: " Rob Herring
2017-10-17 21:32 ` Alan Tull
2017-10-17 21:46 ` Rob Herring
2017-10-17 23:51 ` Frank Rowand
2017-10-18 15:12 ` Alan Tull
2017-10-18 15:44 ` Rob Herring
2017-10-18 15:53 ` Pantelis Antoniou
2017-10-18 18:30 ` Rob Herring
2017-10-18 21:46 ` Frank Rowand
2017-10-19 8:41 ` Pantelis Antoniou
2017-10-19 8:51 ` Pantelis Antoniou
2017-10-19 20:06 ` Moritz Fischer
2017-10-19 21:46 ` Frank Rowand
2017-10-20 8:06 ` Pantelis Antoniou
2017-10-18 18:39 ` Alan Tull
2017-10-18 21:40 ` Frank Rowand
2017-11-28 13:13 ` Geert Uytterhoeven
2017-11-28 13:26 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170821151651.25096-3-robh@kernel.org \
--to=robh@kernel.org \
--cc=David.Laight@aculab.com \
--cc=benh@kernel.crashing.org \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).