1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-22 16:06:04 -05:00

media: venus: use device managed APIs for power domains

Use devres-enabled version of power domain attach APIs.

Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Link: https://lore.kernel.org/r/1724063350-11993-3-git-send-email-quic_dikshita@quicinc.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
Dikshita Agarwal 2024-08-19 15:59:10 +05:30 committed by Ulf Hansson
parent b6cee6544d
commit 3b019409ce

View file

@ -876,7 +876,7 @@ static int vcodec_domains_get(struct venus_core *core)
if (!res->vcodec_pmdomains_num) if (!res->vcodec_pmdomains_num)
goto skip_pmdomains; 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) if (ret < 0)
return ret; return ret;
@ -902,14 +902,11 @@ static int vcodec_domains_get(struct venus_core *core)
return 0; return 0;
opp_attach_err: opp_attach_err:
dev_pm_domain_detach_list(core->pmdomains);
return ret; return ret;
} }
static void vcodec_domains_put(struct venus_core *core) static void vcodec_domains_put(struct venus_core *core)
{ {
dev_pm_domain_detach_list(core->pmdomains);
if (!core->has_opp_table) if (!core->has_opp_table)
return; return;