To prepare clean-up of OF API, we need to export of_alias_scan. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@xxxxxxxxx> --- Cc: barebox@xxxxxxxxxxxxxxxxxxx --- drivers/of/base.c | 3 ++- include/of.h | 31 ++++++++++++++++++------------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index 616b93d..f3ed836 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -135,7 +135,7 @@ static void of_alias_add(struct alias_prop *ap, struct device_node *np, * the global lookup table with the properties. It returns the * number of alias_prop found, or error code in error case. */ -static void of_alias_scan(void) +void of_alias_scan(void) { struct property *pp; struct alias_prop *app, *tmp; @@ -187,6 +187,7 @@ static void of_alias_scan(void) of_alias_add(ap, np, id, start, len); } } +EXPORT_SYMBOL(of_alias_scan); /** * of_alias_get_id - Get alias id for the given device_node diff --git a/include/of.h b/include/of.h index 300b706..8a69793 100644 --- a/include/of.h +++ b/include/of.h @@ -178,10 +178,11 @@ const struct of_device_id *of_match_node(const struct of_device_id *matches, struct cdev; #ifdef CONFIG_OFTREE -int of_parse_partitions(struct cdev *cdev, struct device_node *node); +extern void of_alias_scan(void); +extern int of_alias_get_id(struct device_node *np, const char *stem); +extern const char *of_alias_get(struct device_node *np); -int of_alias_get_id(struct device_node *np, const char *stem); -const char *of_alias_get(struct device_node *np); +int of_parse_partitions(struct cdev *cdev, struct device_node *node); int of_device_is_stdout_path(struct device_d *dev); const char *of_get_model(void); void *of_flatten_dtb(struct device_node *node); @@ -196,16 +197,6 @@ static inline int of_parse_partitions(struct cdev *cdev, return -EINVAL; } -static inline int of_alias_get_id(struct device_node *np, const char *stem) -{ - return -ENOENT; -} - -static inline const char *of_alias_get(struct device_node *np) -{ - return NULL; -} - static inline int of_device_is_stdout_path(struct device_d *dev) { return 0; @@ -230,6 +221,20 @@ static inline struct device_node *of_get_root_node(void) { return NULL; } + +static inline void of_alias_scan(void) +{ +} + +static inline int of_alias_get_id(struct device_node *np, const char *stem) +{ + return -ENOSYS; +} + +static inline const char *of_alias_get(struct device_node *np) +{ + return NULL; +} #endif #endif /* __OF_H */ -- 1.7.2.5 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox