Skip to content

Commit

Permalink
cpufreq: intel_pstate: Modify check in intel_pstate_update_status()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rafael J. Wysocki committed Mar 28, 2017
1 parent ee8df89 commit 0042b2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/cpufreq/intel_pstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 0042b2c

Please sign in to comment.