class_find_device_by_name(9)
π class_find_device_by_name (9) π
okay so bestie, welcome to the Kernel API Manual β this one's a little function that goes on a whole little quest through a class to find you one specific device by name. it's giving "personal shopper, but for struct device" β¨
πΈ NAME πΈ
class_find_device_by_name β device iterator for locating a particular device of a specific name.
like, it literally iterates so you don't have to π
π¦ SYNOPSIS π¦
struct device * class_find_device_by_name (const struct class *class ,
const char *name );
it hands you back a struct device *, no cap.
π ARGUMENTS π
classβ class type. this is the class you're digging through, the whole vibe-check zone ποΈnameβ name of the device to match. the exact thing you're looking for, the main character we're trying to find π
π SEE ALSO π
- Kernel file
./include/linux/device/class.h struct class(9)class_find_device_by_of_node(9)class_find_device_by_fwnode(9)class_find_device_by_devt(9)- `class_find_device_by_acpi_dev(9)
like, all the other finders β the whole friend group fr fr π«Ά
ngl, if you got here you were probably looking for a device by its name. slay. go get 'em π§
β¨ that's the whole page, bestie β¨ this gem lives in ./include/linux/device, dated October 2026, and that's the tea ππ
π¦ 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