From 2880646d24208d6465c1eb8f6d77ea2b29fc6578 Mon Sep 17 00:00:00 2001 From: Bruno Ducrot Date: Sat, 15 Jul 2006 17:34:03 +0000 Subject: [PATCH] Eliminate duplicate p-states entries Reported and tested by: ales dot rom at kabelnet dot net Reviewed by: njl Approved by: njl, imp (mentor) MFC after: 3 days --- sys/dev/acpica/acpi_perf.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/acpica/acpi_perf.c b/sys/dev/acpica/acpi_perf.c index 4d195b6eecd..79bd0f12b4b 100644 --- a/sys/dev/acpica/acpi_perf.c +++ b/sys/dev/acpica/acpi_perf.c @@ -299,6 +299,12 @@ acpi_perf_evaluate(device_t dev) sc->px_states[count].core_freq >= 0xffff) continue; + /* Check for duplicate entries */ + if (count > 0 && + sc->px_states[count - 1].core_freq == + sc->px_states[count].core_freq) + continue; + count++; } sc->px_count = count;