wmidev_invoke_method(9)
β¨ wmidev_invoke_method π
okay so bestie, welcome to wmidev_invoke_method(9) from the Kernel API Manual β literally the glow-up your WMI driver has been waiting for π«Ά
πΈ NAME πΈ
wmidev_invoke_method β invoke a WMI method that returns values. yes that's the whole vibe, it calls the method AND hands you the receipts π
π SYNOPSIS π
int wmidev_invoke_method (struct wmi_device *wdev , u8 instance , u32
method_id , const struct wmi_buffer *in , struct wmi_buffer *out ,
size_t min_size );
it's giving function signature realness, no cap β¨
π¦ ARGUMENTS π¦
wdevβ awmibus device from a driver. your main character device, if you will πinstanceβ instance index. which one? this one π’method_idβ method ID to call. the specific method bestie, be precise πinβ mandatory WMI buffer containing input for the method call. mandatory means MANDATORY, don't skip it πoutβ mandatory WMI buffer to return the method results. also mandatory, also not optional πΈmin_sizeβ minimum size of the method result data in bytes. the floor, the bare minimum, the bar π
π₯ DESCRIPTION π₯
okay so here's the tea β β this invokes a WMI method that returns values. the way that the caller must free the resulting data inside out using kfree β literally not optional, do it or leak π
said data is guaranteed to be aligned on an 8-byte boundary, which is honestly iconic and very much doing the most for you β¨
and hey, if you've got WMI methods that return no values? different function, bestie β use wmidev_invoke_procedure for that π
β RETURN β
0 on success, or a negative error code on failure. that's it, that's the whole mood π
π SEE ALSO π
kernel file ./drivers/platform/wmi/core.c, plus the whole friend group:
wmi_instance_count(9)wmidev_instance_count(9)wmi_evaluate_method(9)wmidev_evaluate_method(9)wmidev_invoke_procedure(9)wmi_query_block(9)wmidev_block_query(9)wmidev_query_block(9)wmi_set_block(9)wmidev_block_set(9)wmidev_set_block(9)wmi_install_notify_handler(9)wmi_remove_notify_handler(9)wmi_has_guid(9)wmi_get_acpi_device_uid(9)wmi_driver_unregister(9)
π reminder: freeout's data withkfree, and remember 8-byte alignment is guaranteed. no notes, just facts π«Ά
and that's the page babes πΈ β brought to you by ./drivers/platform/wmi, dated **October 2026, catalogue number wmidev_invoke_method(9)`. mwah, go slay your method call π
β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms