]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.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)
committerKelsey Skunberg <kelsey.skunberg@canonical.com>
Mon, 24 May 2021 23:46:24 +0000 (17:46 -0600)
BugLink: https://bugs.launchpad.net/bugs/1929455
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/devfreq/devfreq.c

index 7473405b9c2380a100b0716e22be756e41d6e8fe..6459dacb0697507cf321e6a7bd9fcc04a1ad930d 100644 (file)
@@ -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;
 }