summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_thermal.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2007-12-31 15:56:03 +0000
committerjhb <jhb@FreeBSD.org>2007-12-31 15:56:03 +0000
commitf1b041f1e85fe8106bf879724f690dc5ab6065d6 (patch)
treefff4662d2ef6c95e51cf1f0b8ca4cabad6e3c176 /sys/dev/acpica/acpi_thermal.c
parent6bd8ae5c1ce20d5c045fbcda88aeaecec7aa703b (diff)
downloadFreeBSD-src-f1b041f1e85fe8106bf879724f690dc5ab6065d6.zip
FreeBSD-src-f1b041f1e85fe8106bf879724f690dc5ab6065d6.tar.gz
Use devclass_get_count() instead of devclass_get_maxunit() to get the
correct number of acpi_thermalX devices. Having this wrong caused the acpi_thermal thread to realloc the array of devices on each loop iteration. MFC after: 1 week PR: kern/118497 Submitted by: Pasi Parviainen
Diffstat (limited to 'sys/dev/acpica/acpi_thermal.c')
-rw-r--r--sys/dev/acpica/acpi_thermal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/acpica/acpi_thermal.c b/sys/dev/acpica/acpi_thermal.c
index 045d2ba..383de56 100644
--- a/sys/dev/acpica/acpi_thermal.c
+++ b/sys/dev/acpica/acpi_thermal.c
@@ -914,7 +914,7 @@ acpi_tz_thread(void *arg)
for (;;) {
/* If the number of devices has changed, re-evaluate. */
- if (devclass_get_maxunit(acpi_tz_devclass) != devcount) {
+ if (devclass_get_count(acpi_tz_devclass) != devcount) {
if (devs != NULL) {
free(devs, M_TEMP);
free(sc, M_TEMP);
OpenPOWER on IntegriCloud