From e74d6cd2c484bce20dbbbfcbebb967b7c84e048e Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Sat, 27 Jun 2015 22:59:32 +0800 Subject: [PATCH] powerd: Move TurboOpt test to the beginning of the condition list --- usr.sbin/powerd/powerd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/powerd/powerd.c b/usr.sbin/powerd/powerd.c index 33c342c7cf..59f3d19a3c 100644 --- a/usr.sbin/powerd/powerd.c +++ b/usr.sbin/powerd/powerd.c @@ -470,7 +470,7 @@ acpi_getcpufreq_str(int dom_id, int *highest0, int *lowest0) /* * Detect turbo mode */ - if (highest - v == 1 && !TurboOpt) + if (!TurboOpt && highest - v == 1) highest = v; } @@ -502,7 +502,7 @@ acpi_getcpufreq_bin(int dom_id, int *highest0, int *lowest0) *lowest0 = freq[freqcnt - 1]; *highest0 = freq[0]; - if (freqcnt > 1 && freq[0] - freq[1] == 1 && !TurboOpt) + if (!TurboOpt && freqcnt > 1 && freq[0] - freq[1] == 1) *highest0 = freq[1]; return 1; } -- 2.41.0