summaryrefslogtreecommitdiff
path: root/drivers/devfreq
diff options
context:
space:
mode:
authorDong Aisheng <aisheng.dong@nxp.com>2021-03-23 15:20:08 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-14 10:52:27 +0200
commitc0053d344069b6a1035feb232129e9457f1eb09f (patch)
tree6ec4d64e18529f806820063e66da4e338ab3a955 /drivers/devfreq
parent4c3988bcc3e55f3b4a335fb2cb83ac1b5a24feb7 (diff)
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 <aisheng.dong@nxp.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/devfreq')
-rw-r--r--drivers/devfreq/devfreq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index e4be0435c9ba..59ba59bea0f5 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;
}