diff options
Diffstat (limited to 'include/linux/kobject.h')
| -rw-r--r-- | include/linux/kobject.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 58ae8e00fcdd..7950a37a7146 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/compiler.h> | 22 | #include <linux/compiler.h> |
| 23 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
| 24 | #include <linux/kref.h> | 24 | #include <linux/kref.h> |
| 25 | #include <linux/kobject_ns.h> | ||
| 25 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
| 26 | #include <linux/wait.h> | 27 | #include <linux/wait.h> |
| 27 | #include <asm/atomic.h> | 28 | #include <asm/atomic.h> |
| @@ -106,8 +107,10 @@ extern char *kobject_get_path(struct kobject *kobj, gfp_t flag); | |||
| 106 | 107 | ||
| 107 | struct kobj_type { | 108 | struct kobj_type { |
| 108 | void (*release)(struct kobject *kobj); | 109 | void (*release)(struct kobject *kobj); |
| 109 | struct sysfs_ops *sysfs_ops; | 110 | const struct sysfs_ops *sysfs_ops; |
| 110 | struct attribute **default_attrs; | 111 | struct attribute **default_attrs; |
| 112 | const struct kobj_ns_type_operations *(*child_ns_type)(struct kobject *kobj); | ||
| 113 | const void *(*namespace)(struct kobject *kobj); | ||
| 111 | }; | 114 | }; |
| 112 | 115 | ||
| 113 | struct kobj_uevent_env { | 116 | struct kobj_uevent_env { |
| @@ -118,9 +121,9 @@ struct kobj_uevent_env { | |||
| 118 | }; | 121 | }; |
| 119 | 122 | ||
| 120 | struct kset_uevent_ops { | 123 | struct kset_uevent_ops { |
| 121 | int (*filter)(struct kset *kset, struct kobject *kobj); | 124 | int (* const filter)(struct kset *kset, struct kobject *kobj); |
| 122 | const char *(*name)(struct kset *kset, struct kobject *kobj); | 125 | const char *(* const name)(struct kset *kset, struct kobject *kobj); |
| 123 | int (*uevent)(struct kset *kset, struct kobject *kobj, | 126 | int (* const uevent)(struct kset *kset, struct kobject *kobj, |
| 124 | struct kobj_uevent_env *env); | 127 | struct kobj_uevent_env *env); |
| 125 | }; | 128 | }; |
| 126 | 129 | ||
| @@ -132,7 +135,9 @@ struct kobj_attribute { | |||
| 132 | const char *buf, size_t count); | 135 | const char *buf, size_t count); |
| 133 | }; | 136 | }; |
| 134 | 137 | ||
| 135 | extern struct sysfs_ops kobj_sysfs_ops; | 138 | extern const struct sysfs_ops kobj_sysfs_ops; |
| 139 | |||
| 140 | struct sock; | ||
| 136 | 141 | ||
| 137 | /** | 142 | /** |
| 138 | * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem. | 143 | * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem. |
| @@ -155,14 +160,14 @@ struct kset { | |||
| 155 | struct list_head list; | 160 | struct list_head list; |
| 156 | spinlock_t list_lock; | 161 | spinlock_t list_lock; |
| 157 | struct kobject kobj; | 162 | struct kobject kobj; |
| 158 | struct kset_uevent_ops *uevent_ops; | 163 | const struct kset_uevent_ops *uevent_ops; |
| 159 | }; | 164 | }; |
| 160 | 165 | ||
| 161 | extern void kset_init(struct kset *kset); | 166 | extern void kset_init(struct kset *kset); |
| 162 | extern int __must_check kset_register(struct kset *kset); | 167 | extern int __must_check kset_register(struct kset *kset); |
| 163 | extern void kset_unregister(struct kset *kset); | 168 | extern void kset_unregister(struct kset *kset); |
| 164 | extern struct kset * __must_check kset_create_and_add(const char *name, | 169 | extern struct kset * __must_check kset_create_and_add(const char *name, |
| 165 | struct kset_uevent_ops *u, | 170 | const struct kset_uevent_ops *u, |
| 166 | struct kobject *parent_kobj); | 171 | struct kobject *parent_kobj); |
| 167 | 172 | ||
| 168 | static inline struct kset *to_kset(struct kobject *kobj) | 173 | static inline struct kset *to_kset(struct kobject *kobj) |
