lkml.org 
[lkml]   [2017]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 09/14] cpufreq: intel_pstate: Modify check in intel_pstate_update_status()
Date
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

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>
---
drivers/cpufreq/intel_pstate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-pm/drivers/cpufreq/intel_pstate.c
===================================================================
--- linux-pm.orig/drivers/cpufreq/intel_pstate.c
+++ linux-pm/drivers/cpufreq/intel_pstate.c
@@ -2439,7 +2439,7 @@ static int intel_pstate_update_status(co

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();
\
 
 \ /
  Last update: 2017-03-12 18:35    [W:0.083 / U:2.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site