summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArmin Wolf <W_Armin@gmx.de>2026-04-06 23:32:37 +0300
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2026-04-13 14:11:27 +0300
commit2e2a39149fe37327e0af225f09cad19526a90d48 (patch)
tree159e638c5c56f0988d8093707154d1fe7a44c597 /include
parent1aeded2f55f04fafb07b01e12142fd20c2a3d288 (diff)
downloadlinux-2e2a39149fe37327e0af225f09cad19526a90d48.tar.xz
platform/wmi: Replace .no_notify_data with .min_event_size
WMI drivers using the buffer-based WMI API are expected to reject undersized event payloads. Extend the WMI driver core to allow such drivers to specify their minimum supported event payload size. Also remove the now redundant .no_notify_data field. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://patch.msgid.link/20260406203237.2970-7-W_Armin@gmx.de 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')
-rw-r--r--include/linux/wmi.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/wmi.h b/include/linux/wmi.h
index da94580572a9..2d242575a8b3 100644
--- a/include/linux/wmi.h
+++ b/include/linux/wmi.h
@@ -91,7 +91,7 @@ u8 wmidev_instance_count(struct wmi_device *wdev);
* struct wmi_driver - WMI driver structure
* @driver: Driver model structure
* @id_table: List of WMI GUIDs supported by this driver
- * @no_notify_data: Driver supports WMI events which provide no event data
+ * @min_event_size: Minimum event payload size supported by this driver
* @no_singleton: Driver can be instantiated multiple times
* @probe: Callback for device binding
* @remove: Callback for device unbinding
@@ -101,11 +101,14 @@ u8 wmidev_instance_count(struct wmi_device *wdev);
*
* This represents WMI drivers which handle WMI devices. The data inside the buffer
* passed to the @notify_new callback is guaranteed to be aligned on a 8-byte boundary.
+ * The minimum supported size for said buffer can be specified using @min_event_size.
+ * WMI drivers that still use the deprecated @notify callback can still set @min_event_size
+ * to 0 in order to signal that they support WMI events which provide no event data.
*/
struct wmi_driver {
struct device_driver driver;
const struct wmi_device_id *id_table;
- bool no_notify_data;
+ size_t min_event_size;
bool no_singleton;
int (*probe)(struct wmi_device *wdev, const void *context);