]> git.sesse.net Git - bcachefs-tools-debian/blob - include/linux/device.h
remove library from bcachefs-tools Rust package
[bcachefs-tools-debian] / include / linux / device.h
1 #ifndef _DEVICE_H_
2 #define _DEVICE_H_
3
4 #include <linux/slab.h>
5 #include <linux/types.h>
6
7 struct module;
8
9 struct class {
10 };
11
12 static inline void class_destroy(struct class *class)
13 {
14         kfree(class);
15 }
16
17 static inline struct class * __must_check class_create(struct module *owner,
18                                                        const char *name)
19 {
20         return kzalloc(sizeof(struct class), GFP_KERNEL);
21 }
22
23 struct device {
24 };
25
26 static inline void device_unregister(struct device *dev)
27 {
28         kfree(dev);
29 }
30
31 static inline void device_destroy(struct class *cls, dev_t devt) {}
32
33 static inline struct device *device_create(struct class *cls, struct device *parent,
34                              dev_t devt, void *drvdata,
35                              const char *fmt, ...)
36 {
37         return kzalloc(sizeof(struct device), GFP_KERNEL);
38 }
39
40 #endif /* _DEVICE_H_ */