DF-4409 / fix.diff
fix.diff for DF-4409 — remove the notify handler that was actually installed instead of hardcoding acpi_asus_notify (which mismatches acpi_asus_eeepc_notify on EeePC and leaves the real handler registered past detach). Authored against the read-only sys/ tree; never applied there. fix_status: not_testable (no ATK0100/ASUS010 firmware on the audit guest; see env.txt). --- a/sys/dev/acpica/acpi_asus/acpi_asus.c +++ b/sys/dev/acpica/acpi_asus/acpi_asus.c @@ -116,6 +116,9 @@ struct acpi_asus_softc { device_t dev; ACPI_HANDLE handle; ACPI_HANDLE lcdd_handle; + void (*n_func)(ACPI_HANDLE, UINT32, void *); + /* handler we installed; removed verbatim in + * acpi_asus_detach() */ struct acpi_asus_model *model; @@ -804,12 +807,14 @@ AcpiEvaluateObject(sc->handle, "BSTS", NULL, NULL); /* Handle notifies */ - if (sc->model->n_func == NULL) - sc->model->n_func = acpi_asus_notify; + if (sc->model->n_func == NULL) + sc->n_func = acpi_asus_notify; + else + sc->n_func = sc->model->n_func; AcpiInstallNotifyHandler(sc->handle, ACPI_SYSTEM_NOTIFY, - sc->model->n_func, dev); + sc->n_func, dev); @@ -857,8 +862,8 @@ /* Remove notify handler */ - AcpiRemoveNotifyHandler(sc->handle, ACPI_SYSTEM_NOTIFY, - acpi_asus_notify); + AcpiRemoveNotifyHandler(sc->handle, ACPI_SYSTEM_NOTIFY, + sc->n_func); if (sc->lcdd_handle) { |