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@xxxxxxxxxxxxxx> --- 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