opp: Always add entries in dev_list with opp_table->lock held
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 22 Oct 2020 06:42:27 +0000 (12:12 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Mon, 2 Nov 2020 05:15:37 +0000 (10:45 +0530)
commitef43f01ac06976b2aa2b17266d307bb1a4f7e6f9
treea95507529f3d026af183fcf5aa708e29a4873078
parente0df59de670b48a923246fae1f972317b84b2764
opp: Always add entries in dev_list with opp_table->lock held

The readers of dev_list expect the updates to it to take place from
within the opp_table->lock and this is missing in the case where the
dev_list is updated for already managed OPPs.

Fix that by calling _add_opp_dev() from there and remove the now unused
_add_opp_dev_unlocked() callback. While at it, also reduce the length of
the critical section in _add_opp_dev().

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/core.c