attribute_c...to_container(9)
π attribute_c...to_container(9) β like, the Kernel API Manual, but make it make sense
okay bestie, so this one's from the Kernel API Manual and it's genuinely one of the short ones β a little one-job helper function that we're gonna get so familiar with β¨
πΈ NAME πΈ
attribute_container_classdev_to_container β you hand it a classdev, it hands you back the container. that's it. that's the whole gig π
π SYNOPSIS π
struct attribute_container * attribute_container_classdev_to_container
(struct device *classdev );
like, yes, the line break in the middle is real, don't come for me, that's literally how it's written π«Ά
π¦ ARGUMENTS π¦
classdevβ the class device created byattribute_container_add_device. that's the one you're passing in, queen π
β DESCRIPTION β
Returns the container associated with this classdev. periodt. one in, one out, no cap π
π₯ SEE ALSO π₯
kernel file ./drivers/base/attribute_container.c β that's where the whole squad lives, go read it fr fr π
and the rest of the friend group, all iconically linked:
attribute_container_register(9)attribute_container_unregister(9)attribute_container_add_device(9)attribute_container_remove_device(9)attribute_container_device_trigger_safe(9)attribute_container_device_trigger(9)attribute_container_add_attrs(9)attribute_container_add_class_device(9)attribute_container_remove_attrs(9)attribute_container_class_device_del(9)attribute_container_find_class_device(9)
and that's the whole page, bestie β go slay some drivers π§π
cute lil sign-off: this one's filed under./drivers/base, dated October 2026, and answers toattribute_c...to_container(9)π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms