Message ID | 1720763312-13018-1-git-send-email-quic_dikshita@quicinc.com |
---|---|
Headers | show |
Series | add device managed version of dev_pm_domain_attach|detach_list() | expand |
On 12/07/2024 06:48, Dikshita Agarwal wrote: > Use devres-enabled version of power domain attach APIs. > > Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> > --- > drivers/media/platform/qcom/venus/pm_helpers.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c > index 5028220..86221e0 100644 > --- a/drivers/media/platform/qcom/venus/pm_helpers.c > +++ b/drivers/media/platform/qcom/venus/pm_helpers.c > @@ -869,7 +869,7 @@ static int vcodec_domains_get(struct venus_core *core) > if (!res->vcodec_pmdomains_num) > goto skip_pmdomains; > > - ret = dev_pm_domain_attach_list(dev, &vcodec_data, &core->pmdomains); > + ret = devm_pm_domain_attach_list(dev, &vcodec_data, &core->pmdomains); > if (ret < 0) > return ret; > > @@ -895,14 +895,11 @@ static int vcodec_domains_get(struct venus_core *core) > return 0; > > opp_attach_err: > - dev_pm_domain_detach_list(core->pmdomains); > return ret; > } > > static void vcodec_domains_put(struct venus_core *core) > { > - dev_pm_domain_detach_list(core->pmdomains); > - > if (!core->has_opp_table) > return; > Less is more. Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
On Fri, 12 Jul 2024 at 07:49, Dikshita Agarwal <quic_dikshita@quicinc.com> wrote: > > These patches add the devres-enabled version of dev_pm_domain_attach|detach_list > in pm domain framework and use the same APIs in venus driver. > If any client drivers use devm_pm_domain_attach_list() to attach the PM domains, > devm_pm_domain_detach_list() will be invoked implicitly during remove phase. > > Dikshita Agarwal (2): > PM: domains: add device managed version of > dev_pm_domain_attach|detach_list() > media: venus: use device managed APIs for power domains > > drivers/base/power/common.c | 41 ++++++++++++++++++++++++++ > drivers/media/platform/qcom/venus/pm_helpers.c | 5 +--- > include/linux/pm_domain.h | 4 +++ > 3 files changed, 46 insertions(+), 4 deletions(-) > This ended up being a little bit late for v6.11, please re-post a new version when rc-1 is out. Kind regards Uffe