From: Sascha Hauer <s.hauer@pengutronix.de>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] of: base: add chosen node if it does not exist when adding initrd
Date: Mon, 12 Dec 2016 06:47:28 +0100 [thread overview]
Message-ID: <20161212054728.7huafvpweafhbnzg@pengutronix.de> (raw)
In-Reply-To: <20161208101551.32119-1-p.zabel@pengutronix.de>
On Thu, Dec 08, 2016 at 11:15:51AM +0100, Philipp Zabel wrote:
> If the chosen node does not exist, of_add_initrd fails to pass the
> initrd to the kernel. Instead it should create the chosen node, just
> like of_fixup_bootargs does.
>
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> ---
> drivers/of/base.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks
Sascha
>
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index 767d4e1..0c20fcd 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -2019,9 +2019,9 @@ int of_add_initrd(struct device_node *root, resource_size_t start,
> struct device_node *chosen;
> __be32 buf[2];
>
> - chosen = of_find_node_by_path_from(root, "/chosen");
> + chosen = of_create_node(root, "/chosen");
> if (!chosen)
> - return -EINVAL;
> + return -ENOMEM;
>
> if (end) {
> of_write_number(buf, start, 2);
> --
> 2.10.2
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2016-12-12 5:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-08 10:15 Philipp Zabel
2016-12-12 5:47 ` Sascha Hauer [this message]
2016-12-12 9:20 ` Jan Lübbe
2017-01-09 6:42 ` Sascha Hauer
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=20161212054728.7huafvpweafhbnzg@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=p.zabel@pengutronix.de \
/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