summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_thermal.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-10-16 17:28:53 +0000
committerjhb <jhb@FreeBSD.org>2002-10-16 17:28:53 +0000
commit4cd3dda29171288aa0573256111fd627b057ca9b (patch)
tree1b6f9ed7a4251559f2049f2eba5dec525f9d6ff1 /sys/dev/acpica/acpi_thermal.c
parenta307d114081c6667904ee03c3fb7c2bc079ee3ce (diff)
downloadFreeBSD-src-4cd3dda29171288aa0573256111fd627b057ca9b.zip
FreeBSD-src-4cd3dda29171288aa0573256111fd627b057ca9b.tar.gz
Catch up to changes in acpivar.h to add support for using ACPI on
4-stable systems. Sponsored by: The Weather Channel
Diffstat (limited to 'sys/dev/acpica/acpi_thermal.c')
-rw-r--r--sys/dev/acpica/acpi_thermal.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/acpica/acpi_thermal.c b/sys/dev/acpica/acpi_thermal.c
index 74fc962..7806180 100644
--- a/sys/dev/acpica/acpi_thermal.c
+++ b/sys/dev/acpica/acpi_thermal.c
@@ -31,8 +31,6 @@
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/kthread.h>
-#include <sys/lock.h>
-#include <sys/mutex.h>
#include <sys/bus.h>
#include <sys/proc.h>
#include <sys/reboot.h>
@@ -145,6 +143,7 @@ static int
acpi_tz_probe(device_t dev)
{
int result;
+ ACPI_LOCK_DECL;
ACPI_LOCK;
@@ -171,6 +170,7 @@ acpi_tz_attach(device_t dev)
struct acpi_softc *acpi_sc;
int error;
char oidname[8];
+ ACPI_LOCK_DECL;
ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
@@ -665,6 +665,7 @@ acpi_tz_active_sysctl(SYSCTL_HANDLER_ARGS)
struct acpi_tz_softc *sc;
int active;
int error;
+ ACPI_LOCK_DECL;
ACPI_LOCK;
@@ -757,6 +758,7 @@ acpi_tz_power_profile(void *arg)
ACPI_STATUS status;
struct acpi_tz_softc *sc = (struct acpi_tz_softc *)arg;
int state;
+ ACPI_LOCK_DECL;
state = power_profile_get_state();
if (state != POWER_PROFILE_PERFORMANCE &&
@@ -796,6 +798,7 @@ acpi_tz_thread(void *arg)
{
device_t *devs;
int devcount, i;
+ ACPI_LOCK_DECL;
ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
@@ -806,7 +809,9 @@ acpi_tz_thread(void *arg)
for (;;) {
tsleep(&acpi_tz_proc, PZERO, "nothing", hz * acpi_tz_polling_rate);
+#if __FreeBSD_version >= 500000
mtx_lock(&Giant);
+#endif
if (devcount == 0)
devclass_get_devices(acpi_tz_devclass, &devs, &devcount);
@@ -816,6 +821,8 @@ acpi_tz_thread(void *arg)
acpi_tz_timeout(device_get_softc(devs[i]));
ACPI_UNLOCK;
+#if __FreeBSD_version >= 500000
mtx_unlock(&Giant);
+#endif
}
}
OpenPOWER on IntegriCloud