Merge "PM / devfreq: memlat: fix suspend/resume calls to devfreq_monitor"

This commit is contained in:
qctecmdr 2020-03-22 15:13:43 -07:00 • committed by Gerrit - the friendly Code Review server
commit b592907498

View file

@ -208,10 +208,12 @@ err_start:
static int gov_suspend(struct devfreq *df)
{
struct memlat_node *node = df->data;
struct memlat_hwmon *hw = node->hw;
unsigned long prev_freq = df->previous_freq;
node->mon_started = false;
devfreq_monitor_suspend(df);
if (!hw->should_ignore_df_monitor)
devfreq_monitor_suspend(df);
mutex_lock(&df->lock);
update_devfreq(df);
@ -225,6 +227,7 @@ static int gov_suspend(struct devfreq *df)
static int gov_resume(struct devfreq *df)
{
struct memlat_node *node = df->data;
struct memlat_hwmon *hw = node->hw;
mutex_lock(&df->lock);
update_devfreq(df);
@ -232,7 +235,8 @@ static int gov_resume(struct devfreq *df)
node->resume_freq = 0;
devfreq_monitor_resume(df);
if (!hw->should_ignore_df_monitor)
devfreq_monitor_resume(df);
node->mon_started = true;
return 0;