summaryrefslogtreecommitdiffstats
path: root/sys/i386/acpica
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2004-01-12 19:35:31 +0000
committernjl <njl@FreeBSD.org>2004-01-12 19:35:31 +0000
commiteead54ba87b4e281bd6623c81b276cb929a19548 (patch)
tree6fd3e51240ffaa39d2a343ac2ff398dcdacc7ff0 /sys/i386/acpica
parent3f4a150002eae9afaf5f1905294bdb762862b15e (diff)
downloadFreeBSD-src-eead54ba87b4e281bd6623c81b276cb929a19548.zip
FreeBSD-src-eead54ba87b4e281bd6623c81b276cb929a19548.tar.gz
Only remove the handler if we installed it.
Diffstat (limited to 'sys/i386/acpica')
-rw-r--r--sys/i386/acpica/acpi_toshiba.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/i386/acpica/acpi_toshiba.c b/sys/i386/acpica/acpi_toshiba.c
index 9f582d4..23d2d31 100644
--- a/sys/i386/acpica/acpi_toshiba.c
+++ b/sys/i386/acpica/acpi_toshiba.c
@@ -256,8 +256,10 @@ acpi_toshiba_detach(device_t dev)
ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
sc = device_get_softc(dev);
- AcpiRemoveNotifyHandler(sc->handle, ACPI_DEVICE_NOTIFY,
- acpi_toshiba_notify);
+ if (enable_fn_keys != 0) {
+ AcpiRemoveNotifyHandler(sc->handle, ACPI_DEVICE_NOTIFY,
+ acpi_toshiba_notify);
+ }
sysctl_ctx_free(&sc->sysctl_ctx);
return (0);
OpenPOWER on IntegriCloud