Thread (22 messages) 22 messages, 4 authors, 2021-03-12

Re: [PATCH v2 01/14] opp: Add devres wrapper for dev_pm_opp_set_clkname

From: Ulf Hansson <hidden>
Date: 2021-03-12 10:37:59
Also in: dri-devel, linux-arm-msm, linux-media, linux-mmc, linux-pm, linux-samsung-soc, linux-spi, linux-tegra, lkml

On Fri, 12 Mar 2021 at 06:33, Viresh Kumar [off-list ref] wrote:
On 11-03-21, 22:20, Dmitry Osipenko wrote:
quoted
+struct opp_table *devm_pm_opp_set_clkname(struct device *dev, const char *name)
+{
+     struct opp_table *opp_table;
+     int err;
+
+     opp_table = dev_pm_opp_set_clkname(dev, name);
+     if (IS_ERR(opp_table))
+             return opp_table;
+
+     err = devm_add_action_or_reset(dev, devm_pm_opp_clkname_release, opp_table);
+     if (err)
+             opp_table = ERR_PTR(err);
+
+     return opp_table;
+}
I wonder if we still need to return opp_table from here, or a simple
integer is fine.. The callers shouldn't be required to use the OPP
table directly anymore I believe and so better simplify the return
part of this and all other routines you are adding here..
Yes, please. I was thinking along the same lines, when I reviewed the
mmc patch (patch9).
If there is a user which needs the opp_table, let it use the regular
non-devm variant.
Kind regards
Uffe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help