diff options
| author | Viresh Kumar <viresh.kumar@linaro.org> | 2025-04-23 13:18:40 +0300 |
|---|---|---|
| committer | Viresh Kumar <viresh.kumar@linaro.org> | 2025-04-24 13:35:53 +0300 |
| commit | 7a3be00771aa9786c7bb4cdb0ee36fee45f67d69 (patch) | |
| tree | a2941cf84b3483bf75e3f158b08f76c3a8855531 /include | |
| parent | 4cb1383f9522a3d2f5e26b70688417187c7d48e4 (diff) | |
| download | linux-7a3be00771aa9786c7bb4cdb0ee36fee45f67d69.tar.xz | |
OPP: Return opp from dev_pm_opp_get()
For convenience of users, return back the pointer to the opp from
dev_pm_opp_get(), so they can do:
opp = dev_pm_opp_get(tmp_opp);
No intentional functional impact.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/pm_opp.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h index c247317aae38..5e4c3428b139 100644 --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h @@ -161,7 +161,7 @@ struct dev_pm_opp *dev_pm_opp_find_bw_ceil(struct device *dev, struct dev_pm_opp *dev_pm_opp_find_bw_floor(struct device *dev, unsigned int *bw, int index); -void dev_pm_opp_get(struct dev_pm_opp *opp); +struct dev_pm_opp *dev_pm_opp_get(struct dev_pm_opp *opp); void dev_pm_opp_put(struct dev_pm_opp *opp); int dev_pm_opp_add_dynamic(struct device *dev, struct dev_pm_opp_data *opp); @@ -345,7 +345,10 @@ static inline struct dev_pm_opp *dev_pm_opp_find_bw_floor(struct device *dev, return ERR_PTR(-EOPNOTSUPP); } -static inline void dev_pm_opp_get(struct dev_pm_opp *opp) {} +static inline struct dev_pm_opp *dev_pm_opp_get(struct dev_pm_opp *opp) +{ + return opp; +} static inline void dev_pm_opp_put(struct dev_pm_opp *opp) {} |
