]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
PM / devfreq: Use more accurate returned new_freq as resume_freq
authorDong Aisheng <aisheng.dong@nxp.com>
Tue, 23 Mar 2021 07:20:08 +0000 (15:20 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 07:50:15 +0000 (09:50 +0200)
[ 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 <aisheng.dong@nxp.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/devfreq/devfreq.c

index 1db04cbcf227a62da0a35b1f7f87e6c4e7e2e603..98f03a02d11221c19c97674f2f86b7ad94003c10 100644 (file)
@@ -377,7 +377,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;
 }