usb_role_switch_put(9)
π usb_role_switch_put(9) β the Kernel API Manual moment
okay so bestie, this one's a kernel API page, and honestly? it's a short one, we love a low-effort icon β¨
πΈ NAME πΈ
usb_role_switch_put β Release handle to a switch
literally what it says on the tin: you're letting go of a handle to a switch π«Ά
π SYNOPSIS π
void usb_role_switch_put (struct usb_role_switch *sw );
that's the whole vibe check, no cap π
π¦ ARGUMENTS π¦
swβ USB Role Switch. that's your switch, your main character, the thing you're holding a handle to π
β¨ DESCRIPTION β¨
Decrement reference count for sw.
that's it. that's the whole description. it's giving "short and slay" π lowkey the tiniest little function description and we're obsessed. you call it, the refcount for sw goes down by one. periodt π
π SEE ALSO π
Kernel file ./drivers/usb/roles/class.c β and also these absolute icons:
usb_role_switch_set_role(9)usb_role_switch_get_role(9)usb_role_switch_get(9)fwnode_usb_role_switch_get(9)usb_role_switch_find_by_fwnode(9)usb_role_switch_register(9)usb_role_switch_unregister(9)usb_role_switch_set_drvdata(9)usb_role_switch_get_drvdata(9)
like, go read those too fr fr π§π
heads up bestie: since all this does is decrement a reference count, you're gonna wanna make sure you actually should be dropping that handle β the page doesn't say what happens if you over-put, but refcounts being what they are, just... don't be weird about it π
and that's the page!! sources say it lives in ./drivers/usb/roles, dated October 2026, and it's part of the Kernel API Manual π bye bestie, go decrement responsibly π¦β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms