devm_iio_hw_consumer_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– devm_iio_hw_consumer_alloc(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual ✨ β€” yes we're reading kernel docs together, this is our bonding activity now, no takebacks 🫢


🌸 NAME 🌸

devm_iio_hw_consumer_alloc β€” it's the resource-managed version of iio_hw_consumer_alloc(), and yes that mouthful of a name is literally the whole vibe πŸ’…


✨ SYNOPSIS ✨

struct iio_hw_consumer * devm_iio_hw_consumer_alloc (struct device *dev
);

like look at her go, so iconic, so struct iio_hw_consumer * πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” pointer to the consumer device. that's the one, that's the whole argument, she's lowkey easy πŸ’œ

πŸ”₯ DESCRIPTION πŸ”₯

So this is the managed iio_hw_consumer_alloc, bestie. The iio_hw_consumer you get from this function is automatically freed on driver detach β€” like devm said "don't worry about it, I gotchu" and honestly? main character energy πŸ‘‘

And what does she return, you ask πŸ‘€ β€” a pointer to the allocated iio_hw_consumer on success, and NULL on failure. fr fr, that's it. no cap. ✨


πŸŽ€ SEE ALSO πŸŽ€

okay so like, the kernel file is ./drivers/iio/buffer/industrialio-hw-consumer.c and she's got a whole friend group, go say hi to all of them πŸ’–


and that's the whole page, mwah πŸ’‹ sign-off time: this lil gem comes from ./drivers/iio/buffer, dated October 2026, and it's titled devm_iio_hw_consumer_alloc(9) because obviously πŸ’… go forth and allocate responsibly, bestie πŸŒˆπŸ“

πŸ“¦ where this page comes from