devm_lwmi_ev...ter_notifier(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

devm_lwmi_events_register_notifier β€” bestie, this is the one that adds a notifier to the notifier chain πŸŽ€

Okay so quick vibe check: this is a Kernel API Manual page, section 9, and it's literally about registering a notifier on the lenovo-wmi-events driver. Let's get into it πŸ’…


✨ SYNOPSIS ✨

int devm_lwmi_events_register_notifier (struct device *dev , struct
notifier_block *nb );

That's the whole handshake, no cap 🫢


✨ ARGUMENTS ✨

  • dev β€” the parent device of the notifier_block struct. Like, the main character device that this whole thing belongs to πŸ‘‘
  • nb β€” the actual notifier_block struct you wanna register. This is the thing being signed up ✨

✨ DESCRIPTION ✨

So here's the tea πŸ“: this function calls lwmi_events_register_notifier to register that notifier block onto the lenovo-wmi-events driver blocking notifier chain. Iconic, honestly.

Then β€” and this is the devm part that's giving ✨main character energy✨ β€” it adds unregister_notifier as a device managed action, so the notifier block gets automatically unregistered when its parent device is removed. Not me having to clean up manually... couldn't be me πŸ™ˆ

Like, automatic cleanup? Obsessed. It's literally doing the work so you don't have to πŸ’–


✨ RETURN ✨

0 on success, or an error code 😭 (fingers crossed for the 0 fr fr)


✨ SEE ALSO ✨


πŸ¦‹ Go read those siblings too bestie, iykyk β€” the whole friend group is relevant.

And that's the page! 🌸 Big slay to the source over at ./drivers/platform/x86/lenovo, version dated October 2026 β€” mwah, thanks for the lore πŸ’œπŸ§šβ€β™€οΈβ­

πŸ“¦ where this page comes from