devm_mux_state_get_selected(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– devm_mux_state_get_selected(9) πŸ’–

okay so welcome to the Kernel API Manual, bestie β€” today’s main character is devm_mux_state_get_selected(9), and it’s literally the resource-managed way to get a mux-state for a device. slay. πŸ’…


🌸 NAME 🌸

devm_mux_state_get_selected β€” get the mux-state for a device, with resource management. 🫢


✨ SYNOPSIS ✨

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

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device that needs a mux-state. πŸ”₯
  • mux_name β€” the name identifying the mux-state. πŸ¦‹

πŸ¦‹ RETURN πŸ¦‹

you get back a pointer to the mux-state, or an ERR_PTR with a negative errno. that’s the vibe: pointer = yes, ERR_PTR with negative errno = nope 😭.


🌈 DESCRIPTION 🌈

the returned mux-state (if valid) is already selected. periodt. πŸ‘‘

and on release, the mux-state will automatically be deselected and freed β€” resource management is doing the cleanup arc for you, no cap. 🧚


πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file is ./drivers/mux/core.c, and the whole friend group is:


okay bye bestie β€” source/version: ./drivers/mux, dated October 2026, for devm_mux_state_get_selected(9) πŸ«ΆπŸ’…

πŸ“¦ where this page comes from