mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Subject: [PATCH v1 2/8] ARM: boards: skov-imx6: fixup_machine_compatible() add optional root node
Date: Thu,  9 Sep 2021 11:13:43 +0200	[thread overview]
Message-ID: <20210909091349.9446-2-o.rempel@pengutronix.de> (raw)
In-Reply-To: <20210909091349.9446-1-o.rempel@pengutronix.de>

This will be needed by the next patch

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 arch/arm/boards/skov-imx6/board.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch/arm/boards/skov-imx6/board.c b/arch/arm/boards/skov-imx6/board.c
index a58172b2b1..030ac62c52 100644
--- a/arch/arm/boards/skov-imx6/board.c
+++ b/arch/arm/boards/skov-imx6/board.c
@@ -432,16 +432,18 @@ static void skov_init_board(const struct board_description *variant)
 	}
 }
 
-static void fixup_machine_compatible(const char *compat)
+static void fixup_machine_compatible(const char *compat,
+				     struct device_node *root)
 {
 	const char *curcompat;
-	struct device_node *root;
 	int cclen = 0, clen = strlen(compat) + 1;
 	void *buf;
 
-	root = of_get_root_node();
-	if (!root)
-		return;
+	if (!root) {
+		root = of_get_root_node();
+		if (!root)
+			return;
+	}
 
 	curcompat = of_get_property(root, "compatible", &cclen);
 
@@ -487,7 +489,7 @@ static int skov_imx6_probe(struct device_d *dev)
 	globalvar_add_simple("board.dts", variant->dts_compatible);
 	globalvar_add_simple("board.display", variant->display ?: NULL);
 
-	fixup_machine_compatible(variant->dts_compatible);
+	fixup_machine_compatible(variant->dts_compatible, NULL);
 
 	skov_init_board(variant);
 
-- 
2.30.2


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


  reply	other threads:[~2021-09-09  9:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-09  9:13 [PATCH v1 1/8] ARM: dts: skov-imx6: add USB nodes Oleksij Rempel
2021-09-09  9:13 ` Oleksij Rempel [this message]
2021-09-09  9:13 ` [PATCH v1 3/8] ARM: boards: skov-imx6: add switch detection Oleksij Rempel
2021-09-09  9:13 ` [PATCH v1 4/8] ARM: boards: skov-imx6: disable eth0 for barebox if no switch is detected Oleksij Rempel
2021-09-09  9:13 ` [PATCH v1 5/8] ARM: boards: skov-imx6: fixup different DTS variants Oleksij Rempel
2021-09-09  9:13 ` [PATCH v1 6/8] ARM: boards: skov-imx6: start using deep-probe Oleksij Rempel
2021-09-09  9:13 ` [PATCH v1 7/8] ARM: boards: skov-imx6: set net.ifup_force_detect if no switch is detected Oleksij Rempel
2021-09-09  9:13 ` [PATCH v1 8/8] ifup: optimize net boot time for USB ethernet adapters Oleksij Rempel
2021-09-09  9:28   ` Lucas Stach
2021-09-09 10:24     ` Oleksij Rempel
2021-09-09 10:36       ` Lucas Stach

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=20210909091349.9446-2-o.rempel@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --subject='Re: [PATCH v1 2/8] ARM: boards: skov-imx6: fixup_machine_compatible() add optional root node' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox