[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1411023787-11458-1-git-send-email-tianyu.lan@intel.com>
Date: Thu, 18 Sep 2014 15:03:07 +0800
From: Lan Tianyu <tianyu.lan@...el.com>
To: rjw@...ysocki.net, viresh.kumar@...aro.org
Cc: Lan Tianyu <tianyu.lan@...el.com>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/1] Cpufreq: Keep cpufreq sysfs nodes across S2RAM/S2DISK when using intel_pstate driver.
Cpufreq core introduces cpufreq_suspended flag to let cpufreq sysfs nodes
across S2RAM/S2DISK. But the flag is only set in the cpufreq_suspend()
for cpufreq drivers which have target or target_index callback. This
skips intel_pstate driver. This patch is to set the flag before checking
target or target_index callback.
Signed-off-by: Lan Tianyu <tianyu.lan@...el.com>
---
drivers/cpufreq/cpufreq.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index d9fdedd..eb9bb78 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1656,6 +1656,8 @@ void cpufreq_suspend(void)
if (!cpufreq_driver)
return;
+ cpufreq_suspended = true;
+
if (!has_target())
return;
@@ -1670,8 +1672,6 @@ void cpufreq_suspend(void)
pr_err("%s: Failed to suspend driver: %p\n", __func__,
policy);
}
-
- cpufreq_suspended = true;
}
/**
@@ -1687,13 +1687,13 @@ void cpufreq_resume(void)
if (!cpufreq_driver)
return;
+ cpufreq_suspended = false;
+
if (!has_target())
return;
pr_debug("%s: Resuming Governors\n", __func__);
- cpufreq_suspended = false;
-
list_for_each_entry(policy, &cpufreq_policy_list, policy_list) {
if (cpufreq_driver->resume && cpufreq_driver->resume(policy))
pr_err("%s: Failed to resume driver: %p\n", __func__,
--
1.8.4.rc0.1.g8f6a3e5.dirty
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists