diff mbox series

[RFC,v3,05/10] opp: of: export _opp_of_get_opp_desc_node

Message ID 20200127200350.24465-6-sibis@codeaurora.org
State New
Headers show
Series [RFC,v3,01/10] arm64: dts: qcom: sdm845: Add SoC compatible to MTP | expand

Commit Message

Sibi Sankar Jan. 27, 2020, 8:03 p.m. UTC
Export _opp_of_get_opp_desc_node in preparation for attaching multiple
opp_table per device.

Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
---
 drivers/opp/of.c  | 3 +--
 drivers/opp/opp.h | 2 ++
 2 files changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/opp/of.c b/drivers/opp/of.c
index 43acf54934be7..015ee9ab09485 100644
--- a/drivers/opp/of.c
+++ b/drivers/opp/of.c
@@ -25,8 +25,7 @@ 
  * Returns opp descriptor node for a device node, caller must
  * do of_node_put().
  */
-static struct device_node *_opp_of_get_opp_desc_node(struct device_node *np,
-						     int index)
+struct device_node *_opp_of_get_opp_desc_node(struct device_node *np, int index)
 {
 	/* "operating-points-v2" can be an array for power domain providers */
 	return of_parse_phandle(np, "operating-points-v2", index);
diff --git a/drivers/opp/opp.h b/drivers/opp/opp.h
index 9e021f819acca..6f56ff6038605 100644
--- a/drivers/opp/opp.h
+++ b/drivers/opp/opp.h
@@ -226,12 +226,14 @@  void _put_opp_list_kref(struct opp_table *opp_table);
 void _of_init_opp_table(struct opp_table *opp_table, struct device *dev, int index);
 void _of_clear_opp_table(struct opp_table *opp_table);
 struct opp_table *_managed_opp(struct device *dev, int index);
+struct device_node *_opp_of_get_opp_desc_node(struct device_node *np, int index);
 void _of_opp_free_required_opps(struct opp_table *opp_table,
 				struct dev_pm_opp *opp);
 #else
 static inline void _of_init_opp_table(struct opp_table *opp_table, struct device *dev, int index) {}
 static inline void _of_clear_opp_table(struct opp_table *opp_table) {}
 static inline struct opp_table *_managed_opp(struct device *dev, int index) { return NULL; }
+static inline struct device_node *_opp_of_get_opp_desc_node(struct device_node *np, int index) { return NULL; }
 static inline void _of_opp_free_required_opps(struct opp_table *opp_table,
 					      struct dev_pm_opp *opp) {}
 #endif