diff options
| author | Armin Wolf <W_Armin@gmx.de> | 2026-10-19 23:02:23 +0800 |
|---|---|---|
| committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2026-10-20 15:05:34 +0300 |
| commit | 6e01338e987886c03e58b3523adb1f1df176822e (patch) | |
| tree | e18729ab4dc4c05858933b433ace0cc4093c48e6 /include/linux | |
| parent | 893018d51f27ec0449155b0afe371aaf65380630 (diff) | |
platform/wmi: Introduce wmidev_exists()
Some WMI drivers need to be able to detect the existence of WMI
devices matching a given GUID in order to determine the availability
of optional features. Using wmi_has_guid() for this will not work for
WMI devices that cannot be used with the legacy GUID-based API (aka
have WMI_GUID_DUPLICATED set).
Introduce wmidev_exists() that also checks WMI devices that are only
available to the bus-based API. Also mark wmi_has_guid() as deprecated
because only WMI drivers using the legacy GUID-based API will continue
to have use for it.
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Tested-by: Navon John Lukose <navonjohnlukose@gmail.com>
Reviewed-by: Derek J. Clark <derekjohn.clark@gmail.com>
Signed-off-by: Rong Zhang <i@rong.moe>
Link: https://patch.msgid.link/20261019-lwmi-wmi-new-api-v5-1-71557d28d058@rong.moe
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/wmi.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/wmi.h b/include/linux/wmi.h index defcb624a7e2..3dd223f2ff18 100644 --- a/include/linux/wmi.h +++ b/include/linux/wmi.h @@ -13,6 +13,7 @@ #include <linux/acpi.h> #include <linux/device-id/wmi.h> #include <linux/types.h> +#include <linux/uuid.h> /** * struct wmi_device - WMI device structure @@ -83,6 +84,8 @@ acpi_status wmidev_block_set(struct wmi_device *wdev, u8 instance, const struct u8 wmidev_instance_count(struct wmi_device *wdev); +bool wmidev_exists(const guid_t *guid); + /** * struct wmi_driver - WMI driver structure * @driver: Driver model structure |
