aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAkash Asthana <[email protected]>2020-04-15 15:53:10 +0530
committerGeorgi Djakov <[email protected]>2020-04-27 21:44:33 +0300
commite145d9a184f23639edc864e2fa08fcc1853361a4 (patch)
tree5426d21b7f67c133cb2c5151879a2f146c00496b /include/linux
parent6a8b55ed4056ea5559ebe4f6a4b247f627870d4c (diff)
interconnect: Add devm_of_icc_get() as exported API for users
Users can use devm version of of_icc_get() to benefit from automatic resource release. Signed-off-by: Akash Asthana <[email protected]> Reviewed by: Matthias Kaehlcke <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Georgi Djakov <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/interconnect.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/interconnect.h b/include/linux/interconnect.h
index d70a914cba11..770692421f4c 100644
--- a/include/linux/interconnect.h
+++ b/include/linux/interconnect.h
@@ -28,6 +28,7 @@ struct device;
struct icc_path *icc_get(struct device *dev, const int src_id,
const int dst_id);
struct icc_path *of_icc_get(struct device *dev, const char *name);
+struct icc_path *devm_of_icc_get(struct device *dev, const char *name);
void icc_put(struct icc_path *path);
int icc_set_bw(struct icc_path *path, u32 avg_bw, u32 peak_bw);
void icc_set_tag(struct icc_path *path, u32 tag);
@@ -46,6 +47,12 @@ static inline struct icc_path *of_icc_get(struct device *dev,
return NULL;
}
+static inline struct icc_path *devm_of_icc_get(struct device *dev,
+ const char *name)
+{
+ return NULL;
+}
+
static inline void icc_put(struct icc_path *path)
{
}