From: Oleksij Rempel <linux@rempel-privat.de>
To: barebox@lists.infradead.org
Cc: Oleksij Rempel <linux@rempel-privat.de>
Subject: [PATCH v2 3/4] of: base: don't try to read cells_name property if no cells_name set
Date: Fri, 7 Jun 2019 09:32:09 +0200 [thread overview]
Message-ID: <20190607073210.13915-3-linux@rempel-privat.de> (raw)
In-Reply-To: <20190607073210.13915-1-linux@rempel-privat.de>
Some device tree node parsed by of_count_phandle_with_args() have no #*-cells
parameter. To make linux device trees work with barebox, we should accept
cells_name set to NULL, so sync this behavior with linux.
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
---
drivers/of/base.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 838f530f8..d72c687ef 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1360,7 +1360,8 @@ static int __of_parse_phandle_with_args(const struct device_node *np,
np->full_name);
goto err;
}
- if (of_property_read_u32(node, cells_name, &count)) {
+ if (cells_name &&
+ of_property_read_u32(node, cells_name, &count)) {
pr_err("%s: could not get %s for %s\n",
np->full_name, cells_name,
node->full_name);
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-06-07 7:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-07 7:32 [PATCH v2 1/4] add syscon_regmap_lookup_by_phandle() support Oleksij Rempel
2019-06-07 7:32 ` [PATCH v2 2/4] elf: add missing elf32_shdr Oleksij Rempel
2019-06-07 7:32 ` Oleksij Rempel [this message]
2019-06-07 7:32 ` [PATCH v2 4/4] port reduced version of remoteproc framework from linux Oleksij Rempel
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=20190607073210.13915-3-linux@rempel-privat.de \
--to=linux@rempel-privat.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