diff --git a/drivers/devfreq/governor_memlat.c b/drivers/devfreq/governor_memlat.c index dc7ec7e22368..02b1bf5fdf0e 100644 --- a/drivers/devfreq/governor_memlat.c +++ b/drivers/devfreq/governor_memlat.c @@ -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;