diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2021-03-14 19:33:55 +0300 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2021-03-15 09:26:53 +0530 |
commit | 32aee78bc5184c7a51a081939721e97cfad4a44e (patch) | |
tree | b795d1917f4d18241e3f3e2d59448a7e097a97aa /include/linux/pm_opp.h | |
parent | a74f681c3710b47a093d910ca7c6666b3d1e3a2c (diff) | |
download | lwn-32aee78bc5184c7a51a081939721e97cfad4a44e.tar.gz lwn-32aee78bc5184c7a51a081939721e97cfad4a44e.zip |
opp: Add devres wrapper for dev_pm_opp_set_regulators
Add devres wrapper for dev_pm_opp_set_regulators() to simplify drivers
code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'include/linux/pm_opp.h')
-rw-r--r-- | include/linux/pm_opp.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h index 0583d775aa5a..3e667af57211 100644 --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h @@ -148,6 +148,7 @@ struct opp_table *dev_pm_opp_set_prop_name(struct device *dev, const char *name) void dev_pm_opp_put_prop_name(struct opp_table *opp_table); struct opp_table *dev_pm_opp_set_regulators(struct device *dev, const char * const names[], unsigned int count); void dev_pm_opp_put_regulators(struct opp_table *opp_table); +int devm_pm_opp_set_regulators(struct device *dev, const char * const names[], unsigned int count); struct opp_table *dev_pm_opp_set_clkname(struct device *dev, const char *name); void dev_pm_opp_put_clkname(struct opp_table *opp_table); int devm_pm_opp_set_clkname(struct device *dev, const char *name); @@ -349,6 +350,13 @@ static inline struct opp_table *dev_pm_opp_set_regulators(struct device *dev, co static inline void dev_pm_opp_put_regulators(struct opp_table *opp_table) {} +static inline int devm_pm_opp_set_regulators(struct device *dev, + const char * const names[], + unsigned int count) +{ + return -EOPNOTSUPP; +} + static inline struct opp_table *dev_pm_opp_set_clkname(struct device *dev, const char *name) { return ERR_PTR(-EOPNOTSUPP); |