Skip to content

Commit c3ddfe6

Browse files
digetxvireshk
authored andcommitted
opp: Drop empty-table checks from _put functions
The current_opp is released only when whole OPP table is released, otherwise it's only marked as removed by dev_pm_opp_remove_table(). Functions like dev_pm_opp_put_clkname() and dev_pm_opp_put_supported_hw() are checking whether OPP table is empty and it's not if current_opp is set since it holds the refcount of OPP, this produces a noisy warning from these functions about busy OPP table. Remove the checks to fix it. Cc: [email protected] Fixes: 81c4d8a ("opp: Keep track of currently programmed OPP") Signed-off-by: Dmitry Osipenko <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
1 parent 335ffab commit c3ddfe6

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

drivers/opp/core.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,9 +1856,6 @@ void dev_pm_opp_put_supported_hw(struct opp_table *opp_table)
18561856
if (unlikely(!opp_table))
18571857
return;
18581858

1859-
/* Make sure there are no concurrent readers while updating opp_table */
1860-
WARN_ON(!list_empty(&opp_table->opp_list));
1861-
18621859
kfree(opp_table->supported_hw);
18631860
opp_table->supported_hw = NULL;
18641861
opp_table->supported_hw_count = 0;
@@ -1944,9 +1941,6 @@ void dev_pm_opp_put_prop_name(struct opp_table *opp_table)
19441941
if (unlikely(!opp_table))
19451942
return;
19461943

1947-
/* Make sure there are no concurrent readers while updating opp_table */
1948-
WARN_ON(!list_empty(&opp_table->opp_list));
1949-
19501944
kfree(opp_table->prop_name);
19511945
opp_table->prop_name = NULL;
19521946

@@ -2056,9 +2050,6 @@ void dev_pm_opp_put_regulators(struct opp_table *opp_table)
20562050
if (!opp_table->regulators)
20572051
goto put_opp_table;
20582052

2059-
/* Make sure there are no concurrent readers while updating opp_table */
2060-
WARN_ON(!list_empty(&opp_table->opp_list));
2061-
20622053
if (opp_table->enabled) {
20632054
for (i = opp_table->regulator_count - 1; i >= 0; i--)
20642055
regulator_disable(opp_table->regulators[i]);
@@ -2178,9 +2169,6 @@ void dev_pm_opp_put_clkname(struct opp_table *opp_table)
21782169
if (unlikely(!opp_table))
21792170
return;
21802171

2181-
/* Make sure there are no concurrent readers while updating opp_table */
2182-
WARN_ON(!list_empty(&opp_table->opp_list));
2183-
21842172
clk_put(opp_table->clk);
21852173
opp_table->clk = ERR_PTR(-EINVAL);
21862174

@@ -2279,9 +2267,6 @@ void dev_pm_opp_unregister_set_opp_helper(struct opp_table *opp_table)
22792267
if (unlikely(!opp_table))
22802268
return;
22812269

2282-
/* Make sure there are no concurrent readers while updating opp_table */
2283-
WARN_ON(!list_empty(&opp_table->opp_list));
2284-
22852270
opp_table->set_opp = NULL;
22862271

22872272
mutex_lock(&opp_table->lock);

0 commit comments

Comments
 (0)