platform/x86: wmi: introduce helper to retrieve event data
authorBarnabás Pőcze <pobrn@protonmail.com>
Sat, 4 Sep 2021 17:56:41 +0000 (17:56 +0000)
committerHans de Goede <hdegoede@redhat.com>
Tue, 14 Sep 2021 10:26:03 +0000 (12:26 +0200)
commit25be44f6e2fc9dd117ba6e18fa58317a2015af17
tree1ea858c2468826a59ac56eac550b2497da1e89f7
parent51142a0886bd34ec3c6e478739484a85b3b81cec
platform/x86: wmi: introduce helper to retrieve event data

Previously, `acpi_wmi_notify_handler()` and `wmi_get_event_data()`
shared more or less the exact same code to query the data for
a particular event.

Introduce a function to get rid of the duplication, and use it
from `acpi_wmi_notify_handler()` and `wmi_get_event_data()`.

Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Link: https://lore.kernel.org/r/20210904175450.156801-30-pobrn@protonmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/wmi.c