diff options
author | bruno <bruno@FreeBSD.org> | 2006-07-15 17:34:03 +0000 |
---|---|---|
committer | bruno <bruno@FreeBSD.org> | 2006-07-15 17:34:03 +0000 |
commit | 7e06df2bafc0b4106d8a9516d1ac5bc7c601fc58 (patch) | |
tree | 205bcd43bed1772aa1767676cdc05b97f2275eb3 /sys/dev | |
parent | 0eacf9737caf2565dd819b5b0335a07ac729f328 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | sys/dev/acpica/acpi_perf.c | 6 |
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; |