attribute_c...class_device(9)
π attribute_c...class_device(9) β from the Kernel API Manual, bestie
okay so this is a man page from the Kernel API Manual and honestly? it's a short one, so let's get into it π
β¨ NAME β¨
attribute_container_find_class_device β the little function whose whole personality is finding the corresponding class_device π΅οΈββοΈ
πΈ SYNOPSIS πΈ
struct device * attribute_container_find_class_device (struct attribute_container *cont , struct device *dev );
like, that's the whole signature. take it in. struct device * in, struct device * out β it's giving symmetry π«
π¦ ARGUMENTS π¦
contβ the container. yeah. that one. the container container π«devβ the generic device. the plain one. the no-frills one. main character but make it generic β¨
π DESCRIPTION π
so what does it do? it looks up the device in the container's list of class devices, and then it returns the corresponding class_device. that's it. that's the whole bit. short, sweet, slays, done π
ngl it's a lookup. it finds the thing in the list and hands it back to you. iconic behaviour, zero notes π₯
π SEE ALSO π
the kernel file it lives in, for the curious girlies who like to read source:
Kernel file ./drivers/base/attribute_container.c
and the whole friend group, in the order the original gives them:
attribute_container_classdev_to_container(9)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)
π quick reminder bestie: every one of those is a real sibling function β go read them, don't just guess at what they do, okay? iykyk π
and that's the page!! π§ sign-off time: this one comes out of ./drivers/base, and the version date on it is October 2026. mwah, go forth and find your class_device πππ¦
π¦ 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