diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2007-08-12 14:43:55 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-12 17:51:06 -0400 |
commit | 5c5daf657cb5f963a38413f2852279d7a3843144 (patch) | |
tree | ec314c25ca40528bd4625944a93846d1654c9cd9 /include/linux/kobject.h | |
parent | 07c015e7654821f2dda00dcf152c65b2afd46ac3 (diff) |
Driver core: exclude kobject_uevent.c for !CONFIG_HOTPLUG
Move uevent specific logic from the core into kobject_uevent.c, which
does no longer require to link the unused string array if hotplug
is not compiled in.
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/kobject.h')
-rw-r--r-- | include/linux/kobject.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 56f5eaf10ea9..0777b3f57ae6 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -58,9 +58,6 @@ enum kobject_action { | |||
58 | KOBJ_MAX | 58 | KOBJ_MAX |
59 | }; | 59 | }; |
60 | 60 | ||
61 | /* The list of strings defining the valid kobject actions as specified above */ | ||
62 | extern const char *kobject_actions[]; | ||
63 | |||
64 | struct kobject { | 61 | struct kobject { |
65 | const char * k_name; | 62 | const char * k_name; |
66 | struct kref kref; | 63 | struct kref kref; |
@@ -241,6 +238,9 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, | |||
241 | 238 | ||
242 | int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) | 239 | int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) |
243 | __attribute__((format (printf, 2, 3))); | 240 | __attribute__((format (printf, 2, 3))); |
241 | |||
242 | int kobject_action_type(const char *buf, size_t count, | ||
243 | enum kobject_action *type); | ||
244 | #else | 244 | #else |
245 | static inline int kobject_uevent(struct kobject *kobj, enum kobject_action action) | 245 | static inline int kobject_uevent(struct kobject *kobj, enum kobject_action action) |
246 | { return 0; } | 246 | { return 0; } |
@@ -251,6 +251,10 @@ static inline int kobject_uevent_env(struct kobject *kobj, | |||
251 | 251 | ||
252 | static inline int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) | 252 | static inline int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) |
253 | { return 0; } | 253 | { return 0; } |
254 | |||
255 | static inline int kobject_action_type(const char *buf, size_t count, | ||
256 | enum kobject_action *type) | ||
257 | { return -EINVAL; } | ||
254 | #endif | 258 | #endif |
255 | 259 | ||
256 | #endif /* __KERNEL__ */ | 260 | #endif /* __KERNEL__ */ |