summaryrefslogtreecommitdiffstats
path: root/sys/compat/linuxkpi/common/include/linux/kobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linuxkpi/common/include/linux/kobject.h')
-rw-r--r--sys/compat/linuxkpi/common/include/linux/kobject.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/kobject.h b/sys/compat/linuxkpi/common/include/linux/kobject.h
index 63fbc56..0e94809 100644
--- a/sys/compat/linuxkpi/common/include/linux/kobject.h
+++ b/sys/compat/linuxkpi/common/include/linux/kobject.h
@@ -59,6 +59,20 @@ struct kobject {
extern struct kobject *mm_kobj;
+struct attribute {
+ const char *name;
+ struct module *owner;
+ mode_t mode;
+};
+
+struct kobj_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr,
+ char *buf);
+ ssize_t (*store)(struct kobject *kobj, struct kobj_attribute *attr,
+ const char *buf, size_t count);
+};
+
static inline void
kobject_init(struct kobject *kobj, struct kobj_type *ktype)
{
@@ -155,17 +169,4 @@ int kobject_set_name(struct kobject *kobj, const char *fmt, ...);
int kobject_init_and_add(struct kobject *kobj, struct kobj_type *ktype,
struct kobject *parent, const char *fmt, ...);
-/* sysfs.h calles for 'kobject' which is defined here,
- * so we need to add the include only after the 'kobject' def.
- */
-#include <linux/sysfs.h>
-
-struct kobj_attribute {
- struct attribute attr;
- ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr,
- char *buf);
- ssize_t (*store)(struct kobject *kobj, struct kobj_attribute *attr,
- const char *buf, size_t count);
-};
-
#endif /* _LINUX_KOBJECT_H_ */
OpenPOWER on IntegriCloud