dev_to_iio_dev(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ dev_to_iio_dev(9) β€” bestie edition ✨

okay so this is a page from the Kernel API Manual, section 9, and it's genuinely so short you could read it in a TikTok-length attention span πŸ’… like, one function, one argument, one giant warning. it's giving "small but mighty."


πŸŽ€ NAME πŸŽ€

dev_to_iio_dev β€” Get IIO device struct from a device struct

literally what it says on the tin, bestie. you hand it a struct device and it hands you back the struct iio_dev that device is chillin' inside of. slay.


πŸ¦‹ SYNOPSIS πŸ¦‹

struct iio_dev * dev_to_iio_dev (struct device *dev );

🌸 ARGUMENTS 🌸

  • dev β€” The device embedded in the IIO device. yes, embedded. it's inside. tucked in. cozy. 🫢

πŸ’€ NOTE πŸ’€

The device must be a IIO device, otherwise the result is undefined.

no cap, this is the important bit. if what you pass in is not an IIO device, there's no error, no nice little NULL, no warning β€” the result is just undefined. that's the manpage's way of saying "you're on your own, bestie 🫢". so like, do the vibe check on your device before you call this. iykyk.


🌈 SEE ALSO 🌈

it's a whole friend group, fr fr. the kernel file ./include/linux/iio/iio.h and then all of these:

like i said. huge friend group. πŸ’–


🧚 sign-off 🧚

and that's the whole page!! it came from the source ./include/linux/iio, dated October 2026, and it's living in the Kernel API Manual as dev_to_iio_dev(9). go forth and convert those device structs responsibly, bestie πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from