platform/x86: wmi: Decouple ACPI notify handler from wmi_block_list
authorArmin Wolf <W_Armin@gmx.de>
Mon, 18 Dec 2023 19:24:19 +0000 (20:24 +0100)
committerHans de Goede <hdegoede@redhat.com>
Tue, 19 Dec 2023 15:32:46 +0000 (16:32 +0100)
commit2c933755eaaa82fffe0201f376713fa2070b9428
treebdd3b150ebd8eb7f09c8963f28399e8e1efd0802
parent095fa72a19f13b15629611d52447cb17ce223bcd
platform/x86: wmi: Decouple ACPI notify handler from wmi_block_list

Currently, the ACPI notify handler searches all WMI devices for
a matching WMI event device. This is inefficient since only WMI devices
associated with the notified ACPI device need to be searched.
Use the WMI bus device and device_for_each_child() to search for
a matching WMI event device instead.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20231218192420.305411-6-W_Armin@gmx.de
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/wmi.c