瀏覽代碼

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>
Rafael J. Wysocki 8 年之前
父節點
當前提交
0042b2c069
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/cpufreq/intel_pstate.c

+ 1 - 1
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();