OPP: Protect dev_list with opp_table lock
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 3 Aug 2018 01:35:21 +0000 (07:05 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Wed, 19 Sep 2018 21:56:40 +0000 (14:56 -0700)
commit3d2556992a878a2210d3be498416aee39e0c32aa
tree76f9566a83f216de277434d5613efdb059f2210d
parent404b1369ea26f598b96ae4d3183262a879703cfe
OPP: Protect dev_list with opp_table lock

The dev_list needs to be protected with a lock, else we may have
simultaneous access (addition/removal) to it and that would be racy.
Extend scope of the opp_table lock to protect dev_list as well.

Tested-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/core.c
drivers/opp/cpu.c
drivers/opp/opp.h