diff options
author | Mikalai Ramanovich <nikolay.romanovich.00@gmail.com> | 2021-10-15 22:13:22 +0300 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2021-10-22 10:57:11 +0200 |
commit | b8d4d35074fddb00e27bfa3acf5f4f8b0696a1af (patch) | |
tree | a27a1c431b2d10897c008570780be0f8ae6e8497 /drivers/platform | |
parent | ab5fe33925c6b03f646a1153771dab047548e4d8 (diff) |
platform/x86: wmi: change notification handler type
Since AML code on some Xiaomi laptops notifies the WMI hotkey with
0x20 event, we need ACPI_ALL_NOTIFY here to be able to handle it.
Signed-off-by: Mikalai Ramanovich <nikolay.romanovich.00@gmail.com>
Link: https://lore.kernel.org/r/20211015191322.73388-1-nikolay.romanovich.00@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/wmi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index e6997be206f1..c34341f4da76 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -1352,7 +1352,7 @@ static int acpi_wmi_remove(struct platform_device *device) { struct acpi_device *acpi_device = ACPI_COMPANION(&device->dev); - acpi_remove_notify_handler(acpi_device->handle, ACPI_DEVICE_NOTIFY, + acpi_remove_notify_handler(acpi_device->handle, ACPI_ALL_NOTIFY, acpi_wmi_notify_handler); acpi_remove_address_space_handler(acpi_device->handle, ACPI_ADR_SPACE_EC, &acpi_wmi_ec_space_handler); @@ -1385,7 +1385,7 @@ static int acpi_wmi_probe(struct platform_device *device) } status = acpi_install_notify_handler(acpi_device->handle, - ACPI_DEVICE_NOTIFY, + ACPI_ALL_NOTIFY, acpi_wmi_notify_handler, NULL); if (ACPI_FAILURE(status)) { @@ -1414,7 +1414,7 @@ err_remove_busdev: device_unregister(wmi_bus_dev); err_remove_notify_handler: - acpi_remove_notify_handler(acpi_device->handle, ACPI_DEVICE_NOTIFY, + acpi_remove_notify_handler(acpi_device->handle, ACPI_ALL_NOTIFY, acpi_wmi_notify_handler); err_remove_ec_handler: |