devm_reset_c...red_by_index(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… devm_reset_control_get_shared_by_index (Kernel API Manual)

okay so this one's from the Kernel API Manual, bestie, and it's one of those devm_-prefixed baddies β€” you already know what that means (we'll get there, don't worry 🫢).


✨ NAME ✨

devm_reset_control_get_shared_by_index β€” resource managed reset_control_get_shared

like, it's the shared-getter but the managed version. main character energy πŸ”₯


πŸŽ€ SYNOPSIS πŸŽ€

struct reset_control * devm_reset_control_get_shared_by_index (struct
device *dev , int index );

yes she returns a struct reset_control *, no she's not doing it alone πŸ’…


🌸 ARGUMENTS 🌸

  • dev β€” the device that's gonna get reset by the controller. it's literally the whole point of the call, she's the one being reset 🎯
  • index β€” the index of the reset controller. like which one, bestie. you gotta tell her which one πŸ“

πŸ¦‹ DESCRIPTION πŸ¦‹

So this is the managed version of reset_control_get_shared β€” same vibe, but with the devm_ glow-up ✨.

Here's the tea, and it's the whole reason this function exists: for reset controllers returned from this function, reset_control_put gets called automatically on driver detach. no manual cleanup, no "oops I forgot to free it," no leaks. she handles it. slay πŸ’…

And if you wanna know more about the actual shared semantics? go read reset_control_get_shared β€” this page points you there for more information, and honestly same, that's where the details live πŸ“–


πŸ’œ SEE ALSO πŸ’œ

Kernel file ./include/linux/reset.h, plus the whole friend group:


and that's the page!! πŸ’– this one came out of ./include/linux, October 2026 vintage, so if you cite her you know exactly where she's from. mwah, go forth and manage your resets πŸ§šβ€β™€οΈβ­

πŸ“¦ where this page comes from