@@ -1826,6 +1826,7 @@ int of_add_property(struct device_node *np, struct property *prop)
return rc;
}
+EXPORT_SYMBOL(of_add_property);
int __of_remove_property(struct device_node *np, struct property *prop)
{
@@ -1894,6 +1895,7 @@ int of_remove_property(struct device_node *np, struct property *prop)
return rc;
}
+EXPORT_SYMBOL(of_remove_property);
int __of_update_property(struct device_node *np, struct property *newprop,
struct property **oldpropp)
@@ -1970,6 +1972,7 @@ int of_update_property(struct device_node *np, struct property *newprop)
return rc;
}
+EXPORT_SYMBOL(of_update_property);
static void of_alias_add(struct alias_prop *ap, struct device_node *np,
int id, const char *stem, int stem_len)
@@ -668,6 +668,23 @@ static inline int of_machine_is_compatible(const char *compat)
return 0;
}
+static inline int of_add_property(struct device_node *np, struct property *prop)
+{
+ return -ENOTSUPP;
+}
+
+static inline int of_remove_property(struct device_node *np,
+ struct property *prop)
+{
+ return -ENOTSUPP;
+}
+
+static inline int of_update_property(struct device_node *np,
+ struct property *newprop)
+{
+ return -ENOTSUPP;
+}
+
static inline bool of_console_check(const struct device_node *dn, const char *name, int index)
{
return false;
The of_add_property(), of_remove_property() and of_update_property() API are not exported and are limited to only built-in modules at the moment. Export these so they can be used within modules. Also added the stubs for the !CONFIG_OF case for these functions. Signed-off-by: Suman Anna <s-anna@ti.com> --- Hi Rob, We came across a need for this during some remoteproc enhancements for providing a standard OF API. Please see the discussion in [1]. I am not sure which EXPORT_SYMBOL variant (_GPL or plain) to use as I see some mixed usage in this base, I have followed the convention used on of_find_property. [1] https://patchwork.kernel.org/patch/9237767/ drivers/of/base.c | 3 +++ include/linux/of.h | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html