devm_lwmi_ev...ter_notifier(9)
β¨ 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 thenotifier_blockstruct. Like, the main character device that this whole thing belongs to πnbβ the actualnotifier_blockstruct 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 β¨
- Kernel file
./drivers/platform/x86/lenovo/wmi-events.c lwmi_events_register_notifier(9)lwmi_events_unregister_notifier(9)devm_lwmi_events_unregister_notifier(9)lwmi_events_notify(9)
π¦ 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
- 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