[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1625790474-8376-5-git-send-email-wcheng@codeaurora.org>
Date: Thu, 8 Jul 2021 17:27:52 -0700
From: Wesley Cheng <wcheng@...eaurora.org>
To: robh+dt@...nel.org, frowand.list@...il.com, balbi@...nel.org,
gregkh@...uxfoundation.org, agross@...nel.org,
bjorn.andersson@...aro.org
Cc: devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org, linux-arm-msm@...r.kernel.org,
jackp@...eaurora.org, fntoth@...il.com,
Wesley Cheng <wcheng@...eaurora.org>
Subject: [PATCH v13 4/6] 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@...eaurora.org>
---
drivers/of/base.c | 1 +
include/linux/of.h | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 48e941f..5883d63 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 9c2e71e..0e786b60 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;
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
Powered by blists - more mailing lists