platform/x86: wmi: Allow retrieving the number of WMI object instances
authorArmin Wolf <W_Armin@gmx.de>
Sun, 30 Apr 2023 20:31:52 +0000 (22:31 +0200)
committerHans de Goede <hdegoede@redhat.com>
Tue, 9 May 2023 10:07:25 +0000 (12:07 +0200)
commit2a2b13ae50cf70e07b471301ff50299f31d81c1d
treedc0a47eea618886daa8bf328590039b21874c738
parent24f7b9a0650561cea1a20e54f8a55522cbff10ab
platform/x86: wmi: Allow retrieving the number of WMI object instances

Currently, the WMI driver core knows how many instances of a given
WMI object exist, but WMI drivers cannot access this information.
At the same time, some current and upcoming WMI drivers want to
have access to this information. Add wmi_instance_count() and
wmidev_instance_count() to allow WMI drivers to get the number of
WMI object instances.

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