usb_role_switch_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so welcome to usb_role_switch_get(9), brought to you by the Kernel API Manual πŸ’– bestie, this one is short and sweet, and it’s literally about finding the USB role switch linked with the caller. slay. ✨

πŸŽ€ NAME πŸŽ€

usb_role_switch_get β€” Find USB role switch linked with the caller πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

struct usb_role_switch * usb_role_switch_get (struct device *dev );

🫢 ARGUMENTS 🫢

  • dev β€” the caller device. that’s the whole argument, bestie, and it’s giving main character energy πŸ‘‘

🌸 DESCRIPTION 🌸

It finds and returns the role switch linked with dev. The reference count for the found switch is incremented β€” so yeah, the refcount goes up, no cap. πŸ¦‹βœ¨

🌈 SEE ALSO 🌈

Kernel file: ./drivers/usb/roles/class.c πŸ’–


okay bye bestie πŸ’‹ this page is from source/version ./drivers/usb/roles, dated October 2026, and it’s usb_role_switch_get(9) β€” mwah, take care of those refcounts πŸŽ€πŸ’–

πŸ“¦ where this page comes from