From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] ARM: Layerscape: ls1046ardb: add missing machine protection
Date: Thu, 7 Nov 2024 08:24:51 +0100 [thread overview]
Message-ID: <20241107072451.1687301-1-s.hauer@pengutronix.de> (raw)
rdb_late_init() should only run on the appropriate machine. Check the
machine before continuing.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/ls1046ardb/board.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boards/ls1046ardb/board.c b/arch/arm/boards/ls1046ardb/board.c
index ee70171ca3..9570344b92 100644
--- a/arch/arm/boards/ls1046ardb/board.c
+++ b/arch/arm/boards/ls1046ardb/board.c
@@ -125,6 +125,9 @@ static struct nxid *nxp_nxid_read(const char *filename, unsigned int offset)
static int rdb_late_init(void)
{
+ if (!of_machine_is_compatible("fsl,ls1046a-rdb"))
+ return 0;
+
nxp_nxid_read("/dev/eeprom", 256);
return 0;
--
2.39.5
next reply other threads:[~2024-11-07 8:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-07 7:24 Sascha Hauer [this message]
2024-11-08 9:52 ` 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=20241107072451.1687301-1-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