[PATCH 1/2] ACPI: processor_perflib: Simplify code and stop using CPUFREQ_START

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



acpi_processor_ppc_notifier() can live without using CPUFREQ_START
(which is gonna be removed soon). Simplify it a bit.

Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
---
Rebased over: https://marc.info/?l=linux-kernel&m=148359167516831&w=2

 drivers/acpi/processor_perflib.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index f0b4a981b8d3..1ceea1143a1c 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -75,14 +75,12 @@ static int acpi_processor_ppc_notifier(struct notifier_block *nb,
 	struct acpi_processor *pr;
 	unsigned int ppc = 0;
 
-	if (event == CPUFREQ_START && ignore_ppc <= 0) {
-		ignore_ppc = 0;
-		return 0;
-	}
-
 	if (ignore_ppc)
 		return 0;
 
+	if (ignore_ppc < 0)
+		ignore_ppc = 0;
+
 	if (event != CPUFREQ_ADJUST)
 		return 0;
 
-- 
2.7.1.410.g6faf27b

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux