devm_regmap_field_free(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… devm_regmap_field_free β€” like, the kernel API manual one

okay bestie, welcome to the devm_regmap_field_free(9) page, straight out of the Linux kernel API manual ✨ this is the whole entire page, no skips, no cuts πŸŽ€


🌸 NAME 🌸

devm_regmap_field_free β€” frees a register field that was allocated using devm_regmap_field_alloc. that's it, that's the whole job πŸ’–


✨ SYNOPSIS ✨

void devm_regmap_field_free (struct device *dev , struct regmap_field *field );

like, you hand it a device and a field and it takes the field off your hands. icon behaviour, no cap 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the device that will be interacted with. this is the dev in question, the main character πŸ’…
  • field β€” the regmap field that should be freed. yes, the one you want gone πŸ—‘οΈβœ¨

πŸ’€ DESCRIPTION πŸ’€

so basically, this frees a register field that was allocated using devm_regmap_field_alloc.

and here's the lowkey iconic part: usually drivers don't even need to call this function at all 🫢 because the memory allocated via devm gets freed automatically as per the device-driver life-cycle. the kernel handles it for you. it's giving built-in cleanup, it's giving "not me having to remember to free things" πŸ™ˆ

but if you do want to free it manually, this is your girl ✨


πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file ./drivers/base/regmap/regmap.c says hi, and also these legends want your attention πŸŽ€


and that's the whole page bestie, you ate it up πŸ’–βœ¨

sign-off time πŸŽ€ this came from ./drivers/base/regmap, dated October 2026, and it's devm_regmap_field_free(9) β€” periodt. go free that field (or don't, the kernel's got you) πŸ¦‹

πŸ“¦ where this page comes from