class_is_registered(9)
π class_is_registered(9) β the kernel API manual, bestie edition π
okay so this is class_is_registered from the Kernel API Manual, and no cap, it's a tiny little function with a big "bestie be careful" energy. let's get into it β¨
πΈ NAME πΈ
class_is_registered β the way it tells you if, like, right at this exact moment in time, a class is registered in the driver core or not. that's the whole vibe check π¦
β SYNOPSIS β
bool class_is_registered (const struct class *class );
it's giving one argument, one bool, zero drama π
π ARGUMENTS π
classβ the class you wanna check. that's it, that's the argument, she's simple and iconic π
π DESCRIPTION π
so this returns a boolean that states whether the class is registered in the driver core or not. yes, that's literally it β a little yes/no, true/false moment π«Ά
BUT. and this is the important part, bestie, so listen up π β the value could totally switch right after this call is made. like, the millisecond you look away, things can change. so only use this in places where you "know" it's safe to do so (usually to determine if the specific class has been registered yet or not). the quotes around "know" are doing so much work here, iykyk π
Be careful in using this. like, fr fr. this is your friendly reminder that a bool is a snapshot, not a promise π
π SEE ALSO π
- Kernel file
./drivers/base/class.c class_to_subsys(9)class_create(9)class_destroy(9)class_dev_iter_init(9)class_dev_iter_next(9)class_dev_iter_exit(9)class_for_each_device(9)class_find_device(9)class_compat_register(9)class_compat_unregister(9)class_compat_create_link(9)class_compat_remove_link(9)
the whole friend group, honestly. go say hi to the rest of the class functions, they're all main character energy too π
and that's the page! π§ this cutie lives in ./drivers/base, and she was dated October 2026 β that's the source, the version, and the date all in one, so consider this your cute little sign-off, mwah π slay, stay registered, and check your pointers π
π¦ 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