PM / devfreq: tegra30: Move clk-notifier's registration to governor's start
authorDmitry Osipenko <digetx@gmail.com>
Mon, 4 Nov 2019 21:56:06 +0000 (00:56 +0300)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 6 Nov 2019 03:04:00 +0000 (12:04 +0900)
commit6f2a35d65b3c4bbc579a115589edcc7ed6239dce
tree76cb248ef16c8cd470e7bb2c87cad4d4f1452e81
parent11eb6ec5c0d4ad513c62e33009bcb15d84dfff56
PM / devfreq: tegra30: Move clk-notifier's registration to governor's start

There is no point in receiving of the notifications while governor is
stopped, let's keep them disabled like we do for the CPU freq-change
notifications. This also fixes a potential use-after-free bug if
notification happens after device's removal.

Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Peter Geis <pgwipeout@gmail.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/devfreq/tegra30-devfreq.c