devfreq: rk3399_dmc: Don't use OPP structures outside of RCU locks
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 5 Dec 2016 03:23:52 +0000 (08:53 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 8 Dec 2016 00:46:07 +0000 (01:46 +0100)
commite37d35082e75982ef714f9e25bfa43a061d0c5e6
tree5c4a2fa8a614c3592249972c54a6850c61aff126
parentd8323de3d4062e1b5a5aa7e9c0f935138405a582
devfreq: rk3399_dmc: Don't use OPP structures outside of RCU locks

The OPP structures are abused to the best here, without understanding
how the OPP core and RCU locks work.

In short, the OPP pointer saved in 'rk3399_dmcfreq' can become invalid
under your nose, as the OPP core may free it.

Fix various abuses around OPP structures and calls.

Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/devfreq/rk3399_dmc.c