diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-05-21 11:40:49 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-05-21 11:40:49 -0700 |
commit | 98f312bc58156a5922b5a496119e3a42b0ad439a (patch) | |
tree | 6a3b22ef591871c42f9499019cd4cef7b7730285 /drivers/pmdomain | |
parent | 62a12816cb2006776ac8ee9ef026fd99c3a47de6 (diff) | |
parent | dee8f20e61aea655a43b74e5b65bcc6fbc69df7b (diff) |
Merge tag 'pm-6.10-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fixes from Rafael Wysocki:
"These fix the amd-pstate driver and the operating performance point
(OPP) handling related to generic PM domains.
Specifics:
- Fix a memory leak in the exit path of amd-pstate (Peng Ma)
- Fix required_opp_tables handling in the cases when multiple generic
PM domains share one OPP table (Viresh Kumar)"
* tag 'pm-6.10-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
OPP: Fix required_opp_tables for multiple genpds using same table
cpufreq: amd-pstate: fix memory leak on CPU EPP exit
Diffstat (limited to 'drivers/pmdomain')
-rw-r--r-- | drivers/pmdomain/core.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c index 342779464c0d..623d15b68707 100644 --- a/drivers/pmdomain/core.c +++ b/drivers/pmdomain/core.c @@ -184,6 +184,16 @@ static struct generic_pm_domain *dev_to_genpd(struct device *dev) return pd_to_genpd(dev->pm_domain); } +struct device *dev_to_genpd_dev(struct device *dev) +{ + struct generic_pm_domain *genpd = dev_to_genpd(dev); + + if (IS_ERR(genpd)) + return ERR_CAST(genpd); + + return &genpd->dev; +} + static int genpd_stop_dev(const struct generic_pm_domain *genpd, struct device *dev) { |