From: Dong Aisheng Date: Tue, 23 Mar 2021 07:20:08 +0000 (+0800) Subject: PM / devfreq: Use more accurate returned new_freq as resume_freq X-Git-Tag: v5.11.21~355 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=129edd989c1ef51dd88b59658164ae59f2a54c7c;p=thirdparty%2Fkernel%2Fstable.git 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: 83f8ca45afbf0 ("PM / devfreq: add support for suspend/resume of a devfreq device") Signed-off-by: Dong Aisheng Signed-off-by: Chanwoo Choi Signed-off-by: Sasha Levin --- diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 7473405b9c238..6459dacb06975 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -387,7 +387,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; }