summaryrefslogtreecommitdiff
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-03-28 00:14:08 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-03-28 23:12:15 +0200
commit0042b2c0692ade097ef3a6bbffa491da5dc89273 (patch)
tree4878a8d2a611d5ea4834040bf98c639781a043ac /drivers/cpufreq
parentee8df89a68f27a7484f1fc71d3d69149dd4dd267 (diff)
downloadlwn-0042b2c0692ade097ef3a6bbffa491da5dc89273.tar.gz
lwn-0042b2c0692ade097ef3a6bbffa491da5dc89273.zip
cpufreq: intel_pstate: Modify check in intel_pstate_update_status()
One of the checks in intel_pstate_update_status() implicitly relies on the information that there are only two struct cpufreq_driver objects available, but it is better to do it directly against the value it really is about (to make the code easier to follow if nothing else). Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/intel_pstate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 73ccddf94cf4..185006e9fbdb 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -2345,7 +2345,7 @@ static int intel_pstate_update_status(const char *buf, size_t size)
if (size == 7 && !strncmp(buf, "passive", size)) {
if (intel_pstate_driver) {
- if (intel_pstate_driver != &intel_pstate)
+ if (intel_pstate_driver == &intel_cpufreq)
return 0;
ret = intel_pstate_unregister_driver();