aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Wesley Cheng <wcheng@codeaurora.org> 2021-07-10 02:13:13 -0700
committerGravatar Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2021-07-12 09:37:26 +0200
commitfe794e39548308e77e570fdf645d516554b3f873 (patch)
tree07602eb79238c26e28fa8ba8b184ab4613dbaae8
parentusb: dwc3: Resize TX FIFOs to meet EP bursting requirements (diff)
downloadlinux-fe794e39548308e77e570fdf645d516554b3f873.tar.gz
linux-fe794e39548308e77e570fdf645d516554b3f873.tar.bz2
linux-fe794e39548308e77e570fdf645d516554b3f873.zip
of: Add stub for of_add_property()
If building with OF Kconfig disabled, this can lead to errors for drivers utilizing of_add_property(). Add a stub for the add API, as it exists for the remove variant as well, and to avoid compliation issues. Also, export this API so that it can be used by modules. Signed-off-by: Wesley Cheng <wcheng@codeaurora.org> Link: https://lore.kernel.org/r/1625908395-5498-5-git-send-email-wcheng@codeaurora.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/of/base.c1
-rw-r--r--include/linux/of.h5
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 48e941f99558..5883d63c7714 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1821,6 +1821,7 @@ int of_add_property(struct device_node *np, struct property *prop)
return rc;
}
+EXPORT_SYMBOL_GPL(of_add_property);
int __of_remove_property(struct device_node *np, struct property *prop)
{
diff --git a/include/linux/of.h b/include/linux/of.h
index 9c2e71e202d1..0e786b60bd5d 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -946,6 +946,11 @@ 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 0;
+}
+
static inline int of_remove_property(struct device_node *np, struct property *prop)
{
return 0;