mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/3] of_path: Allow to specify path with phandle only
Date: Mon, 28 Apr 2014 11:31:45 +0200	[thread overview]
Message-ID: <1398677505-15869-3-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1398677505-15869-1-git-send-email-s.hauer@pengutronix.de>

Instead of just allowing to specify an OF path with additional
partname: property allow to specify a phandle to the partition
directly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/of/of_path.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/of/of_path.c b/drivers/of/of_path.c
index 20eb771..6a2d634 100644
--- a/drivers/of/of_path.c
+++ b/drivers/of/of_path.c
@@ -148,6 +148,9 @@ int of_find_path(struct device_node *node, const char *propname, char **outpath)
 
 	device_detect(op.dev);
 
+	if (list_is_singular(&op.dev->cdevs))
+		op.cdev = list_first_entry(&op.dev->cdevs, struct cdev, devices_list);
+
 	i = 1;
 
 	while (1) {
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2014-04-28  9:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-28  9:31 [PATCH 1/3] of: partition: set device_node of the newly created partition Sascha Hauer
2014-04-28  9:31 ` [PATCH 2/3] of: move of_find_device_by_node_path to drivers/of/of_path.c Sascha Hauer
2014-04-28  9:31 ` Sascha Hauer [this message]

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=1398677505-15869-3-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.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