devm_gpiod_put(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

hey bestie, welcome to devm_gpiod_put(9) from the Kernel API Manual ✨ this page is short, but it’s giving automatic cleanup main character energy, and we’re keeping every detail, periodt.


πŸ’– NAME πŸ’–

devm_gpiod_put β€” Resource-managed gpiod_put() 🫢

πŸ¦‹ SYNOPSIS πŸ¦‹

okay so the signature is literally right here:

void devm_gpiod_put (struct device *dev , struct gpio_desc *desc );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the GPIO consumer πŸ‘‘
  • desc β€” the GPIO descriptor to dispose of πŸ—‘οΈ

🌸 DESCRIPTION 🌸

so this function disposes of a GPIO descriptor obtained with devm_gpiod_get or devm_gpiod_get_index. that’s the whole job, and it ate. πŸ“

normally this function will not be called, because the GPIO will be disposed of by the resource management code. the resource management code is doing the cleanup for you, iykyk. so yeah β€” usually you don’t need to call this yourself, fr fr.

🌈 SEE ALSO 🌈

Kernel file: ./drivers/gpio/gpiolib-devres.c

and here are all the related besties:


xoxo, your kernel bestie πŸ’… β€” source: ./drivers/gpio β€’ October 2026 β€’ devm_gpiod_put(9)

πŸ“¦ where this page comes from