wmidev_invoke_method(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 β€” a wmi bus 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:


πŸ’€ reminder: free out's data with kfree, 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