PM / devfreq: Use more accurate returned new_freq as resume_freq

[ Upstream commit 62453f1ba5d5def9d58e140a50f3f168f028da38 ]

Use the more accurate returned new_freq as resume_freq.
It's the same as how devfreq->previous_freq was updated.

Fixes: 83f8ca45af ("PM / devfreq: add support for suspend/resume of a devfreq device")
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Dong Aisheng 2021-03-23 15:20:08 +08:00 committed by Greg Kroah-Hartman
parent 51a5e5e93c
commit 3b0cd47fe1
1 changed files with 1 additions and 1 deletions

View File

@ -319,7 +319,7 @@ static int devfreq_set_target(struct devfreq *devfreq, unsigned long new_freq,
devfreq->previous_freq = new_freq;
if (devfreq->suspend_freq)
devfreq->resume_freq = cur_freq;
devfreq->resume_freq = new_freq;
return err;
}