diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-30 19:35:35 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-30 19:35:35 -0400 |
| commit | af9473118979f3b09ee5d92fdbd8014cf085f7c5 (patch) | |
| tree | 922f5623f1861dcf00a33aca5d7f2ae6b7782cb1 /include/linux | |
| parent | 9f8e35fc0c1d96e5383eca5f0c7c963a9fadef57 (diff) | |
| parent | 74c5b597e9c2fc728c61582afdea4971a5c8ed8f (diff) | |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6:
modules: better error messages when modules fail to load due to a sysfs problem.
kobject: update documentation
kset: kernel-doc cleanups
driver core: revert "device" link creation check
stable_api_nonsense.txt: Disambiguate the use of "this" by using "that" to refer to the syscall interface
Fix Doc/sysfs-rules typos
kernel-doc fixes for PCI and drivers/base/
kobject: put kobject_actions in kobject.h
kobject: fix link error when CONFIG_HOTPLUG is disabled
HOWTO: sync Japanese HOWTO
HOWTO: adjust translation header of Japanese stable_api_nonsense.txt
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/kobject.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index aa2fe22b1baa..949706c33622 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
| @@ -56,6 +56,9 @@ enum kobject_action { | |||
| 56 | KOBJ_MAX | 56 | KOBJ_MAX |
| 57 | }; | 57 | }; |
| 58 | 58 | ||
| 59 | /* The list of strings defining the valid kobject actions as specified above */ | ||
| 60 | extern const char *kobject_actions[]; | ||
| 61 | |||
| 59 | struct kobject { | 62 | struct kobject { |
| 60 | const char * k_name; | 63 | const char * k_name; |
| 61 | char name[KOBJ_NAME_LEN]; | 64 | char name[KOBJ_NAME_LEN]; |
| @@ -108,9 +111,15 @@ struct kobj_type { | |||
| 108 | struct attribute ** default_attrs; | 111 | struct attribute ** default_attrs; |
| 109 | }; | 112 | }; |
| 110 | 113 | ||
| 114 | struct kset_uevent_ops { | ||
| 115 | int (*filter)(struct kset *kset, struct kobject *kobj); | ||
| 116 | const char *(*name)(struct kset *kset, struct kobject *kobj); | ||
| 117 | int (*uevent)(struct kset *kset, struct kobject *kobj, char **envp, | ||
| 118 | int num_envp, char *buffer, int buffer_size); | ||
| 119 | }; | ||
| 111 | 120 | ||
| 112 | /** | 121 | /* |
| 113 | * kset - a set of kobjects of a specific type, belonging | 122 | * struct kset - a set of kobjects of a specific type, belonging |
| 114 | * to a specific subsystem. | 123 | * to a specific subsystem. |
| 115 | * | 124 | * |
| 116 | * All kobjects of a kset should be embedded in an identical | 125 | * All kobjects of a kset should be embedded in an identical |
| @@ -126,13 +135,6 @@ struct kobj_type { | |||
| 126 | * supress the event generation or add subsystem specific | 135 | * supress the event generation or add subsystem specific |
| 127 | * variables carried with the event. | 136 | * variables carried with the event. |
| 128 | */ | 137 | */ |
| 129 | struct kset_uevent_ops { | ||
| 130 | int (*filter)(struct kset *kset, struct kobject *kobj); | ||
| 131 | const char *(*name)(struct kset *kset, struct kobject *kobj); | ||
| 132 | int (*uevent)(struct kset *kset, struct kobject *kobj, char **envp, | ||
| 133 | int num_envp, char *buffer, int buffer_size); | ||
| 134 | }; | ||
| 135 | |||
| 136 | struct kset { | 138 | struct kset { |
| 137 | struct kobj_type * ktype; | 139 | struct kobj_type * ktype; |
| 138 | struct list_head list; | 140 | struct list_head list; |
| @@ -173,7 +175,7 @@ static inline struct kobj_type * get_ktype(struct kobject * k) | |||
| 173 | extern struct kobject * kset_find_obj(struct kset *, const char *); | 175 | extern struct kobject * kset_find_obj(struct kset *, const char *); |
| 174 | 176 | ||
| 175 | 177 | ||
| 176 | /** | 178 | /* |
| 177 | * Use this when initializing an embedded kset with no other | 179 | * Use this when initializing an embedded kset with no other |
| 178 | * fields to initialize. | 180 | * fields to initialize. |
| 179 | */ | 181 | */ |
| @@ -198,7 +200,7 @@ extern struct kset kernel_subsys; | |||
| 198 | /* The global /sys/hypervisor/ subsystem */ | 200 | /* The global /sys/hypervisor/ subsystem */ |
| 199 | extern struct kset hypervisor_subsys; | 201 | extern struct kset hypervisor_subsys; |
| 200 | 202 | ||
| 201 | /** | 203 | /* |
| 202 | * Helpers for setting the kset of registered objects. | 204 | * Helpers for setting the kset of registered objects. |
| 203 | * Often, a registered object belongs to a kset embedded in a | 205 | * Often, a registered object belongs to a kset embedded in a |
| 204 | * subsystem. These do no magic, just make the resulting code | 206 | * subsystem. These do no magic, just make the resulting code |
| @@ -233,7 +235,7 @@ extern struct kset hypervisor_subsys; | |||
| 233 | /** | 235 | /** |
| 234 | * subsys_set_kset(obj,subsys) - set kset for subsystem | 236 | * subsys_set_kset(obj,subsys) - set kset for subsystem |
| 235 | * @obj: ptr to some object type. | 237 | * @obj: ptr to some object type. |
| 236 | * @subsys: a subsystem object (not a ptr). | 238 | * @_subsys: a subsystem object (not a ptr). |
| 237 | * | 239 | * |
| 238 | * Can be used for any object type with an embedded ->subsys. | 240 | * Can be used for any object type with an embedded ->subsys. |
| 239 | * Sets the kset of @obj's kobject to @subsys.kset. This makes | 241 | * Sets the kset of @obj's kobject to @subsys.kset. This makes |
