]> git.sesse.net Git - bcachefs-tools-debian/blob - include/linux/sysfs.h
0be85b70f1db7a75289638d3f8d6d8ff05c775ab
[bcachefs-tools-debian] / include / linux / sysfs.h
1 #ifndef _SYSFS_H_
2 #define _SYSFS_H_
3
4 #include <linux/compiler.h>
5 #include <linux/stringify.h>
6
7 struct kobject;
8
9 struct attribute {
10         const char              *name;
11         umode_t                 mode;
12 };
13
14 #define __ATTR(_name, _mode, _show, _store) {                           \
15         .attr = {.name = __stringify(_name), .mode = _mode },           \
16         .show   = _show,                                                \
17         .store  = _store,                                               \
18 }
19
20 static inline int sysfs_create_files(struct kobject *kobj,
21                                     const struct attribute **attr)
22 {
23         return 0;
24 }
25
26 static inline int sysfs_create_link(struct kobject *kobj,
27                                     struct kobject *target, const char *name)
28 {
29         return 0;
30 }
31
32 static inline void sysfs_remove_link(struct kobject *kobj, const char *name)
33 {
34 }
35
36 #endif /* _SYSFS_H_ */