From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master] bus: omap-gpmc: allow build with raw NAND support disabled
Date: Tue, 28 May 2024 13:45:05 +0200 [thread overview]
Message-ID: <20240528114505.1931962-1-a.fatoum@pengutronix.de> (raw)
GCC complains about an undefined reference to `of_get_nand_bus_width'
when building the driver with CONFIG_MTD_RAW_NAND disabled.
Fix this by omitting probe of the NAND children when barebox doesn't
have NAND drivers enabled anyway.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
drivers/bus/omap-gpmc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/omap-gpmc.c b/drivers/bus/omap-gpmc.c
index f720933a0a3f..16ffaf779dd0 100644
--- a/drivers/bus/omap-gpmc.c
+++ b/drivers/bus/omap-gpmc.c
@@ -619,7 +619,8 @@ static int gpmc_probe(struct device *dev)
if (!child->name)
continue;
- if (!strncmp(child->name, "nand", 4))
+ if (IS_ENABLED(CONFIG_MTD_RAW_NAND) &&
+ !strncmp(child->name, "nand", 4))
ret = gpmc_probe_nand_child(dev, child);
else if (strncmp(child->name, "ethernet", 8) == 0 ||
strncmp(child->name, "nor", 3) == 0 ||
--
2.39.2
next reply other threads:[~2024-05-28 11:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 11:45 Ahmad Fatoum [this message]
2024-05-29 6:09 ` 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=20240528114505.1931962-1-a.fatoum@pengutronix.de \
--to=a.fatoum@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