in core.c [2043:2077]
void dev_pm_opp_put_regulators(struct opp_table *opp_table)
{
int i;
if (unlikely(!opp_table))
return;
if (!opp_table->regulators)
goto put_opp_table;
if (opp_table->enabled) {
for (i = opp_table->regulator_count - 1; i >= 0; i--)
regulator_disable(opp_table->regulators[i]);
}
for (i = opp_table->regulator_count - 1; i >= 0; i--)
regulator_put(opp_table->regulators[i]);
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;
}
kfree(opp_table->sod_supplies);
opp_table->sod_supplies = NULL;
mutex_unlock(&opp_table->lock);
kfree(opp_table->regulators);
opp_table->regulators = NULL;
opp_table->regulator_count = -1;
put_opp_table:
dev_pm_opp_put_opp_table(opp_table);
}