[PATCH v2 11/16] of: stub out live tree API when using PBL
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Nov 25 07:12:23 PST 2024
To optimize out calls to undefined functions in PBL at compile-time
instead of link time, let's define stubs for the functions that
are referenced in obj-pbl-y files, but inside function sections
that are ultimately unreferenced.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
include/of.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/of.h b/include/of.h
index 05e92d41b9f0..3d24e17e43a0 100644
--- a/include/of.h
+++ b/include/of.h
@@ -131,7 +131,7 @@ struct cdev;
/* Maximum score returned by of_device_is_compatible() */
#define OF_DEVICE_COMPATIBLE_MAX_SCORE (INT_MAX / 2)
-#ifdef CONFIG_OFTREE
+#if IS_ENABLED(CONFIG_OFTREE) && IN_PROPER
extern struct device_node *of_read_file(const char *filename);
extern struct of_reserve_map *of_get_reserve_map(void);
extern int of_bus_n_addr_cells(struct device_node *np);
--
2.39.5
More information about the barebox
mailing list