1__CLASS_CREATE(9) Device drivers infrastructure __CLASS_CREATE(9)
2
3
4
6 __class_create - create a struct class structure
7
9 struct class * __class_create(struct module * owner, const char * name,
10 struct lock_class_key * key);
11
13 owner
14 pointer to the module that is to “own” this struct class
15
16 name
17 pointer to a string for the name of this class.
18
19 key
20 the lock_class_key for this class; used by mutex lock debugging
21
23 This is used to create a struct class pointer that can then be used in
24 calls to device_create.
25
26 Returns struct class pointer on success, or ERR_PTR on error.
27
28 Note, the pointer created here is to be destroyed when finished by
29 making a call to class_destroy.
30
32Kernel Hackers Manual 3.10 June 2019 __CLASS_CREATE(9)