devm_mux_sta...nal_selected(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… devm_mux_sta...nal_selected(9)

okay so this is a page from the Kernel API Manual (the 9 section, the kernel-doc girlies know) and honestly? it's a little baddie. let's get into it πŸ’–


✨ NAME ✨

devm_mux_state_get_optional_selected β€” grab the optional mux-state for a device, but like… with resource management. devm-coded. no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

struct mux_state * devm_mux_state_get_optional_selected (struct device
*dev , const char *mux_name );

that's the whole vibe. one function, two args, slays. ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device that's out here needing a mux-state. it's giving "please give me a mux-state, i'm literally a device."
  • mux_name β€” the name that identifies the mux-state. it's the ✨identifying✨ name. yes that's the whole description, it's a short king. πŸ‘‘

πŸ”₯ RETURN πŸ”₯

so here's the vibe check on what you get back:

  • a pointer to the mux-state on success πŸŽ‰
  • an ERR_PTR with a negative errno on error 😭
  • NULL if the mux doesn't exist β€” she's not here, she's not coming πŸ’€

🌸 DESCRIPTION 🌸

the returned mux-state (if valid) is already selected. no extra steps bestie, it's pre-selected for you. main character energy only.

and the best part?? the mux-state will automatically be deselected and freed on release. devm said "i'll handle it" and she DID. 🫢 no manual cleanup, no leaks, no stressed vibes.


⭐ SEE ALSO ⭐

okay this list is LONG and honestly iconic, she's a social butterfly. all of these are (9) pages, and they all live in the kernel file ./drivers/mux/core.c:

like i said. A LOT of friends. iykyk πŸ’œ


reminder bestie: this is kernel API, so keep those names and signatures exactly as they are. no renaming, no "improving", no inventing extra behavior. the vibes are mine, the facts are not. πŸ™ˆ

✨ slay, that's the page ✨ source file ./drivers/mux, dated October 2026, and that's on periodt. πŸ“πŸ’…

πŸ“¦ where this page comes from