summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_perf.c
diff options
context:
space:
mode:
authorbruno <bruno@FreeBSD.org>2006-07-15 17:34:03 +0000
committerbruno <bruno@FreeBSD.org>2006-07-15 17:34:03 +0000
commit7e06df2bafc0b4106d8a9516d1ac5bc7c601fc58 (patch)
tree205bcd43bed1772aa1767676cdc05b97f2275eb3 /sys/dev/acpica/acpi_perf.c
parent0eacf9737caf2565dd819b5b0335a07ac729f328 (diff)
downloadFreeBSD-src-7e06df2bafc0b4106d8a9516d1ac5bc7c601fc58.zip
FreeBSD-src-7e06df2bafc0b4106d8a9516d1ac5bc7c601fc58.tar.gz
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
Diffstat (limited to 'sys/dev/acpica/acpi_perf.c')
-rw-r--r--sys/dev/acpica/acpi_perf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi_perf.c b/sys/dev/acpica/acpi_perf.c
index 4d195b6..79bd0f1 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;
OpenPOWER on IntegriCloud