diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /include/linux/kobject.h | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'include/linux/kobject.h')
-rw-r--r-- | include/linux/kobject.h | 44 |
1 files changed, 33 insertions, 11 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 939b11268c8..668729cc0fe 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -72,8 +72,8 @@ struct kobject { | |||
72 | unsigned int uevent_suppress:1; | 72 | unsigned int uevent_suppress:1; |
73 | }; | 73 | }; |
74 | 74 | ||
75 | extern __printf(2, 3) | 75 | extern int kobject_set_name(struct kobject *kobj, const char *name, ...) |
76 | int kobject_set_name(struct kobject *kobj, const char *name, ...); | 76 | __attribute__((format(printf, 2, 3))); |
77 | extern int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, | 77 | extern int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, |
78 | va_list vargs); | 78 | va_list vargs); |
79 | 79 | ||
@@ -83,13 +83,15 @@ static inline const char *kobject_name(const struct kobject *kobj) | |||
83 | } | 83 | } |
84 | 84 | ||
85 | extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype); | 85 | extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype); |
86 | extern __printf(3, 4) __must_check | 86 | extern int __must_check kobject_add(struct kobject *kobj, |
87 | int kobject_add(struct kobject *kobj, struct kobject *parent, | 87 | struct kobject *parent, |
88 | const char *fmt, ...); | 88 | const char *fmt, ...) |
89 | extern __printf(4, 5) __must_check | 89 | __attribute__((format(printf, 3, 4))); |
90 | int kobject_init_and_add(struct kobject *kobj, | 90 | extern int __must_check kobject_init_and_add(struct kobject *kobj, |
91 | struct kobj_type *ktype, struct kobject *parent, | 91 | struct kobj_type *ktype, |
92 | const char *fmt, ...); | 92 | struct kobject *parent, |
93 | const char *fmt, ...) | ||
94 | __attribute__((format(printf, 4, 5))); | ||
93 | 95 | ||
94 | extern void kobject_del(struct kobject *kobj); | 96 | extern void kobject_del(struct kobject *kobj); |
95 | 97 | ||
@@ -191,6 +193,8 @@ static inline struct kobj_type *get_ktype(struct kobject *kobj) | |||
191 | } | 193 | } |
192 | 194 | ||
193 | extern struct kobject *kset_find_obj(struct kset *, const char *); | 195 | extern struct kobject *kset_find_obj(struct kset *, const char *); |
196 | extern struct kobject *kset_find_obj_hinted(struct kset *, const char *, | ||
197 | struct kobject *); | ||
194 | 198 | ||
195 | /* The global /sys/kernel/ kobject for people to chain off of */ | 199 | /* The global /sys/kernel/ kobject for people to chain off of */ |
196 | extern struct kobject *kernel_kobj; | 200 | extern struct kobject *kernel_kobj; |
@@ -203,14 +207,32 @@ extern struct kobject *power_kobj; | |||
203 | /* The global /sys/firmware/ kobject for people to chain off of */ | 207 | /* The global /sys/firmware/ kobject for people to chain off of */ |
204 | extern struct kobject *firmware_kobj; | 208 | extern struct kobject *firmware_kobj; |
205 | 209 | ||
210 | #if defined(CONFIG_HOTPLUG) | ||
206 | int kobject_uevent(struct kobject *kobj, enum kobject_action action); | 211 | int kobject_uevent(struct kobject *kobj, enum kobject_action action); |
207 | int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, | 212 | int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, |
208 | char *envp[]); | 213 | char *envp[]); |
209 | 214 | ||
210 | __printf(2, 3) | 215 | int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) |
211 | int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...); | 216 | __attribute__((format (printf, 2, 3))); |
212 | 217 | ||
213 | int kobject_action_type(const char *buf, size_t count, | 218 | int kobject_action_type(const char *buf, size_t count, |
214 | enum kobject_action *type); | 219 | enum kobject_action *type); |
220 | #else | ||
221 | static inline int kobject_uevent(struct kobject *kobj, | ||
222 | enum kobject_action action) | ||
223 | { return 0; } | ||
224 | static inline int kobject_uevent_env(struct kobject *kobj, | ||
225 | enum kobject_action action, | ||
226 | char *envp[]) | ||
227 | { return 0; } | ||
228 | |||
229 | static inline __attribute__((format(printf, 2, 3))) | ||
230 | int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) | ||
231 | { return 0; } | ||
232 | |||
233 | static inline int kobject_action_type(const char *buf, size_t count, | ||
234 | enum kobject_action *type) | ||
235 | { return -EINVAL; } | ||
236 | #endif | ||
215 | 237 | ||
216 | #endif /* _KOBJECT_H_ */ | 238 | #endif /* _KOBJECT_H_ */ |