Hi Benson, On 22/06/2017 21:35, Benson Leung wrote:
<snip>
In the original patch (https://chromium-review.googlesource.com/c/358155/) ACPI_ALL_NOTIFY is passed to acpi_install_notify_handler() and ACPI_SYSTEM_NOTIFY to acpi_remove_notify_handler. I changed it for remove_notify call to unsure all handler references were removed.+ adev = ACPI_COMPANION(dev); + if (adev) { + status = acpi_install_notify_handler(adev->handle, + ACPI_ALL_NOTIFY,Is there a reason you're using ACPI_ALL_NOTIFY here instead of ACPI_SYSTEM_NOTIFY that is done in the CHROMIUM version of this?
Regards, Thierry
+ cros_ec_lpc_acpi_notify, + ec_dev); + if (ACPI_FAILURE(status)) + dev_warn(dev, "Failed to register notifier %08x\n", + status); + } + return 0; }static int cros_ec_lpc_remove(struct platform_device *pdev){ struct cros_ec_device *ec_dev; + struct acpi_device *adev; + + adev = ACPI_COMPANION(&pdev->dev); + if (adev) + acpi_remove_notify_handler(adev->handle, ACPI_ALL_NOTIFY, + cros_ec_lpc_acpi_notify);ec_dev = platform_get_drvdata(pdev);cros_ec_remove(ec_dev); -- 2.9.3

