Thread (52 messages) 52 messages, 2 authors, 2021-01-22

Re: [PATCH V2] opp: Prepare for ->set_opp() helper to work without regulators

From: Viresh Kumar <viresh.kumar@linaro.org>
Date: 2021-01-22 03:05:55
Also in: lkml

On 22-01-21, 00:02, Dmitry Osipenko wrote:
21.01.2021 14:30, Viresh Kumar пишет:
quoted
@@ -1952,9 +1930,16 @@ void dev_pm_opp_put_regulators(struct opp_table *opp_table)
 	for (i = opp_table->regulator_count - 1; i >= 0; i--)
 		regulator_put(opp_table->regulators[i]);
 
-	_free_set_opp_data(opp_table);
+	mutex_lock(&opp_table->lock);
+	if (opp_table->set_opp_data) {
+		opp_table->set_opp_data->old_opp.supplies = NULL;
+		opp_table->set_opp_data->new_opp.supplies = NULL;
+	}
+	mutex_unlock(&opp_table->lock);
 
+	kfree(opp_table->sod_supplies);
 	kfree(opp_table->regulators);
+	opp_table->sod_supplies = NULL;
 	opp_table->regulators = NULL;
 	opp_table->regulator_count = -1;
The sod_supplies should be unset under the lock.
Fixed, thanks.

-- 
viresh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help