summaryrefslogtreecommitdiff
path: root/include/linux/pm_opp.h
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2017-01-23 07:41:46 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-01-30 11:22:21 +0300
commit7034764a1e4a6edbb60914e89aad8384e3fe5d17 (patch)
treeb12ca30409bb79882cc25cae16beeeed236d4b9c /include/linux/pm_opp.h
parentb83c1899a0e98cabd0997531434e1fb3b6574db8 (diff)
downloadlinux-7034764a1e4a6edbb60914e89aad8384e3fe5d17.tar.xz
PM / OPP: Add 'struct kref' to struct dev_pm_opp
Add kref to struct dev_pm_opp for easier accounting of the OPPs. Note that the OPPs are freed under the opp_table->lock mutex only. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/pm_opp.h')
-rw-r--r--include/linux/pm_opp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
index 99787cbcaab2..731d548657aa 100644
--- a/include/linux/pm_opp.h
+++ b/include/linux/pm_opp.h
@@ -102,6 +102,7 @@ struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev,
struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev,
unsigned long *freq);
+void dev_pm_opp_put(struct dev_pm_opp *opp);
int dev_pm_opp_add(struct device *dev, unsigned long freq,
unsigned long u_volt);
@@ -193,6 +194,8 @@ static inline struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev,
return ERR_PTR(-ENOTSUPP);
}
+static inline void dev_pm_opp_put(struct dev_pm_opp *opp) {}
+
static inline int dev_pm_opp_add(struct device *dev, unsigned long freq,
unsigned long u_volt)
{