cec_notifier_get_conn(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– cec_notifier_get_conn β€” like, the whole notifier situation πŸ’–

okay so bestie, welcome to the Kernel API Manual section for cec_notifier_get_conn(9) β€” yes that (9) is the section number, it's giving very "I live in the kernel docs" energy and we respect it 🫢


✨ NAME ✨

cec_notifier_get_conn β€” find or create a new cec_notifier for the given device and connector tuple πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct cec_notifier * cec_notifier_get_conn (struct device *hdmi_dev ,
const char *port_name );

like literally that's the whole signature, no notes πŸ‘‘


🌸 ARGUMENTS 🌸

  • hdmi_dev β€” the device that sends the events πŸŽ€ this is the one doing the most, main character energy fr
  • port_name β€” the connector name from which the event occurs ✨ iykyk

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the vibe check on what actually happens when you call this πŸ‘‡

If a notifier for device dev already exists, then it just increases the refcount and hands you back that notifier. Reuse era, environmentally friendly, we love to see it 🌈

If it doesn't exist? No problem bestie, it allocates a brand new notifier struct and returns a pointer to that new struct. Fresh out of the box, brand new, iconic πŸŽ€

And if the memory could not be allocated, it returns NULL. 😭 that's the "it's giving out of memory" moment, so like, always check your return value ngl


🌟 SEE ALSO 🌟

  • Kernel file ./drivers/media/cec/core/cec-notifier.c β€” go read the source bestie, it's all there πŸ“–πŸ’–

lowkey important: this returns NULL on allocation failure, so don't just raw-dog the pointer without checking, fr fr πŸ™ˆ

and that's the page!! brought to you by the ./drivers/media/cec/core gang, dated October 2026, filed under cec_notifier_get_conn(9) β€” slay, periodt, go forth and notify πŸ’…βœ¨πŸ“πŸ§šπŸ’œ

πŸ“¦ where this page comes from