mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH master] bus: omap-gpmc: allow build with raw NAND support disabled
@ 2024-05-28 11:45 Ahmad Fatoum
  2024-05-29  6:09 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2024-05-28 11:45 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH master] bus: omap-gpmc: allow build with raw NAND support disabled
  2024-05-28 11:45 [PATCH master] bus: omap-gpmc: allow build with raw NAND support disabled Ahmad Fatoum
@ 2024-05-29  6:09 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2024-05-29  6:09 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum


On Tue, 28 May 2024 13:45:05 +0200, Ahmad Fatoum wrote:
> 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.
> 
> 
> [...]

Applied, thanks!

[1/1] bus: omap-gpmc: allow build with raw NAND support disabled
      https://git.pengutronix.de/cgit/barebox/commit/?id=2375d985921d (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-29  6:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-28 11:45 [PATCH master] bus: omap-gpmc: allow build with raw NAND support disabled Ahmad Fatoum
2024-05-29  6:09 ` Sascha Hauer

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