__ssam_notifier_unregister(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 __ssam_notifier_unregister(9) β€” Kernel API Manual 🌸

okay bestie, welcome to the Kernel API Manual page for __ssam_notifier_unregister(9) β€” the little cleanup queen that says "we're SO done here" to an event notifier. she's giving exit-interview energy and honestly? iconic. πŸ’…


✨ NAME ✨

__ssam_notifier_unregister β€” Unregister an event notifier. that's it, that's the whole job. πŸŽ€


🌈 SYNOPSIS 🌈

int __ssam_notifier_unregister (struct ssam_controller *ctrl , struct
       ssam_event_notifier *n , bool disable );

look at her. three params, one int back, no drama (most of the time πŸ‘€).


πŸ’– ARGUMENTS πŸ’–

  • ctrl β€” The controller the notifier has been registered on. like, the specific one, don't just hand her any controller, she needs the one. 🫢
  • n β€” The event notifier to unregister. the main character of this whole operation fr.
  • disable β€” Whether to disable the corresponding event on the EC. true means yes go talk to the EC about it, false means absolutely not, do not. πŸ’€

πŸ¦‹ DESCRIPTION πŸ¦‹

so, unregister an event notifier. simple, right? mostly! here's the tea tho:

Decrement the usage counter of the associated SAM event if the notifier is not marked as an observer. then β€” and this is the part you gotta pay attention to β€” if the usage counter reaches zero and disable equals true, the event will be disabled.

ngl the disable flag is the whole vibe check here, so let's talk about why it exists. πŸ™ˆ

This function is useful for hot-removable devices, where communication may fail once the device has been physically removed. in that case, specifying disable as false avoids communication with the EC. like, don't yell at the hardware that isn't there anymore bestie, that's just rude and also it won't answer. 😭


⭐ RETURN ⭐

  • Returns zero on success β€” slay. ✨
  • -ENOENT if the given notifier block has not been registered on the controller. (translation: you can't unregister something that was never registered, go home.) πŸ’€
  • If the given notifier block was the last one associated with its specific event, returns the status of the event-disable EC-command. so basically you're also getting the receipts from that EC call, no pressure. πŸ”₯

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/platform/surface/aggregator/controller.c

and now the extended universe, hold on to your iced coffee:

like I said. whole extended universe. iykyk 🧚


and that's the page!! mwah πŸ’‹ this cutie came from ./drivers/platform/surface/agg... and she's stamped October 2026 β€” go unregister responsibly, bestie, and remember: if the counter hits zero and disable is true, the event gets disabled. no cap. πŸ“

πŸ“¦ where this page comes from