diff options
author | njl <njl@FreeBSD.org> | 2004-01-12 19:35:31 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2004-01-12 19:35:31 +0000 |
commit | eead54ba87b4e281bd6623c81b276cb929a19548 (patch) | |
tree | 6fd3e51240ffaa39d2a343ac2ff398dcdacc7ff0 | |
parent | 3f4a150002eae9afaf5f1905294bdb762862b15e (diff) | |
download | FreeBSD-src-eead54ba87b4e281bd6623c81b276cb929a19548.zip FreeBSD-src-eead54ba87b4e281bd6623c81b276cb929a19548.tar.gz |
Only remove the handler if we installed it.
-rw-r--r-- | sys/dev/acpi_support/acpi_toshiba.c | 6 | ||||
-rw-r--r-- | sys/i386/acpica/acpi_toshiba.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/acpi_support/acpi_toshiba.c b/sys/dev/acpi_support/acpi_toshiba.c index 9f582d4..23d2d31 100644 --- a/sys/dev/acpi_support/acpi_toshiba.c +++ b/sys/dev/acpi_support/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); 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); |