diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 2 | ||||
-rw-r--r-- | lib/kobject.c | 13 | ||||
-rw-r--r-- | lib/kobject_uevent.c | 8 |
3 files changed, 13 insertions, 10 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 6ecc180beb71..ccb0c1fdf1b5 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -189,7 +189,7 @@ config FRAME_POINTER | |||
189 | config UNWIND_INFO | 189 | config UNWIND_INFO |
190 | bool "Compile the kernel with frame unwind information" | 190 | bool "Compile the kernel with frame unwind information" |
191 | depends on !IA64 | 191 | depends on !IA64 |
192 | depends on !MODULES || !(MIPS || PARISC || PPC || SUPERH || SPARC64 || V850) | 192 | depends on !MODULES || !(MIPS || PARISC || PPC || SUPERH || V850) |
193 | help | 193 | help |
194 | If you say Y here the resulting kernel image will be slightly larger | 194 | If you say Y here the resulting kernel image will be slightly larger |
195 | but not slower, and it will give very useful debugging information. | 195 | but not slower, and it will give very useful debugging information. |
diff --git a/lib/kobject.c b/lib/kobject.c index 01d957513940..687ab418d292 100644 --- a/lib/kobject.c +++ b/lib/kobject.c | |||
@@ -198,14 +198,14 @@ int kobject_add(struct kobject * kobj) | |||
198 | 198 | ||
199 | /* be noisy on error issues */ | 199 | /* be noisy on error issues */ |
200 | if (error == -EEXIST) | 200 | if (error == -EEXIST) |
201 | printk("kobject_add failed for %s with -EEXIST, " | 201 | pr_debug("kobject_add failed for %s with -EEXIST, " |
202 | "don't try to register things with the " | 202 | "don't try to register things with the " |
203 | "same name in the same directory.\n", | 203 | "same name in the same directory.\n", |
204 | kobject_name(kobj)); | 204 | kobject_name(kobj)); |
205 | else | 205 | else |
206 | printk("kobject_add failed for %s (%d)\n", | 206 | pr_debug("kobject_add failed for %s (%d)\n", |
207 | kobject_name(kobj), error); | 207 | kobject_name(kobj), error); |
208 | dump_stack(); | 208 | /* dump_stack(); */ |
209 | } | 209 | } |
210 | 210 | ||
211 | return error; | 211 | return error; |
@@ -422,7 +422,6 @@ struct kobject *kobject_add_dir(struct kobject *parent, const char *name) | |||
422 | 422 | ||
423 | return k; | 423 | return k; |
424 | } | 424 | } |
425 | EXPORT_SYMBOL_GPL(kobject_add_dir); | ||
426 | 425 | ||
427 | /** | 426 | /** |
428 | * kset_init - initialize a kset for use | 427 | * kset_init - initialize a kset for use |
@@ -569,7 +568,7 @@ int subsys_create_file(struct subsystem * s, struct subsys_attribute * a) | |||
569 | * @s: subsystem. | 568 | * @s: subsystem. |
570 | * @a: attribute desciptor. | 569 | * @a: attribute desciptor. |
571 | */ | 570 | */ |
572 | 571 | #if 0 | |
573 | void subsys_remove_file(struct subsystem * s, struct subsys_attribute * a) | 572 | void subsys_remove_file(struct subsystem * s, struct subsys_attribute * a) |
574 | { | 573 | { |
575 | if (subsys_get(s)) { | 574 | if (subsys_get(s)) { |
@@ -577,6 +576,7 @@ void subsys_remove_file(struct subsystem * s, struct subsys_attribute * a) | |||
577 | subsys_put(s); | 576 | subsys_put(s); |
578 | } | 577 | } |
579 | } | 578 | } |
579 | #endif /* 0 */ | ||
580 | 580 | ||
581 | EXPORT_SYMBOL(kobject_init); | 581 | EXPORT_SYMBOL(kobject_init); |
582 | EXPORT_SYMBOL(kobject_register); | 582 | EXPORT_SYMBOL(kobject_register); |
@@ -588,10 +588,7 @@ EXPORT_SYMBOL(kobject_del); | |||
588 | 588 | ||
589 | EXPORT_SYMBOL(kset_register); | 589 | EXPORT_SYMBOL(kset_register); |
590 | EXPORT_SYMBOL(kset_unregister); | 590 | EXPORT_SYMBOL(kset_unregister); |
591 | EXPORT_SYMBOL(kset_find_obj); | ||
592 | 591 | ||
593 | EXPORT_SYMBOL(subsystem_init); | ||
594 | EXPORT_SYMBOL(subsystem_register); | 592 | EXPORT_SYMBOL(subsystem_register); |
595 | EXPORT_SYMBOL(subsystem_unregister); | 593 | EXPORT_SYMBOL(subsystem_unregister); |
596 | EXPORT_SYMBOL(subsys_create_file); | 594 | EXPORT_SYMBOL(subsys_create_file); |
597 | EXPORT_SYMBOL(subsys_remove_file); | ||
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c index 982226daf939..7f20e7b857cb 100644 --- a/lib/kobject_uevent.c +++ b/lib/kobject_uevent.c | |||
@@ -25,11 +25,13 @@ | |||
25 | #define BUFFER_SIZE 2048 /* buffer for the variables */ | 25 | #define BUFFER_SIZE 2048 /* buffer for the variables */ |
26 | #define NUM_ENVP 32 /* number of env pointers */ | 26 | #define NUM_ENVP 32 /* number of env pointers */ |
27 | 27 | ||
28 | #if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET) | 28 | #if defined(CONFIG_HOTPLUG) |
29 | u64 uevent_seqnum; | 29 | u64 uevent_seqnum; |
30 | char uevent_helper[UEVENT_HELPER_PATH_LEN] = "/sbin/hotplug"; | 30 | char uevent_helper[UEVENT_HELPER_PATH_LEN] = "/sbin/hotplug"; |
31 | static DEFINE_SPINLOCK(sequence_lock); | 31 | static DEFINE_SPINLOCK(sequence_lock); |
32 | #if defined(CONFIG_NET) | ||
32 | static struct sock *uevent_sock; | 33 | static struct sock *uevent_sock; |
34 | #endif | ||
33 | 35 | ||
34 | static char *action_to_string(enum kobject_action action) | 36 | static char *action_to_string(enum kobject_action action) |
35 | { | 37 | { |
@@ -155,6 +157,7 @@ void kobject_uevent(struct kobject *kobj, enum kobject_action action) | |||
155 | spin_unlock(&sequence_lock); | 157 | spin_unlock(&sequence_lock); |
156 | sprintf(seq_buff, "SEQNUM=%llu", (unsigned long long)seq); | 158 | sprintf(seq_buff, "SEQNUM=%llu", (unsigned long long)seq); |
157 | 159 | ||
160 | #if defined(CONFIG_NET) | ||
158 | /* send netlink message */ | 161 | /* send netlink message */ |
159 | if (uevent_sock) { | 162 | if (uevent_sock) { |
160 | struct sk_buff *skb; | 163 | struct sk_buff *skb; |
@@ -179,6 +182,7 @@ void kobject_uevent(struct kobject *kobj, enum kobject_action action) | |||
179 | netlink_broadcast(uevent_sock, skb, 0, 1, GFP_KERNEL); | 182 | netlink_broadcast(uevent_sock, skb, 0, 1, GFP_KERNEL); |
180 | } | 183 | } |
181 | } | 184 | } |
185 | #endif | ||
182 | 186 | ||
183 | /* call uevent_helper, usually only enabled during early boot */ | 187 | /* call uevent_helper, usually only enabled during early boot */ |
184 | if (uevent_helper[0]) { | 188 | if (uevent_helper[0]) { |
@@ -249,6 +253,7 @@ int add_uevent_var(char **envp, int num_envp, int *cur_index, | |||
249 | } | 253 | } |
250 | EXPORT_SYMBOL_GPL(add_uevent_var); | 254 | EXPORT_SYMBOL_GPL(add_uevent_var); |
251 | 255 | ||
256 | #if defined(CONFIG_NET) | ||
252 | static int __init kobject_uevent_init(void) | 257 | static int __init kobject_uevent_init(void) |
253 | { | 258 | { |
254 | uevent_sock = netlink_kernel_create(NETLINK_KOBJECT_UEVENT, 1, NULL, | 259 | uevent_sock = netlink_kernel_create(NETLINK_KOBJECT_UEVENT, 1, NULL, |
@@ -264,5 +269,6 @@ static int __init kobject_uevent_init(void) | |||
264 | } | 269 | } |
265 | 270 | ||
266 | postcore_initcall(kobject_uevent_init); | 271 | postcore_initcall(kobject_uevent_init); |
272 | #endif | ||
267 | 273 | ||
268 | #endif /* CONFIG_HOTPLUG */ | 274 | #endif /* CONFIG_HOTPLUG */ |