aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-06-10 14:47:26 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-06-10 14:47:26 -0400
commitf0cd91a68acdc9b49d7f6738b514a426da627649 (patch)
tree8ad73564015794197583b094217ae0a71e71e753 /lib
parent60eef25701d25e99c991dd0f4a9f3832a0c3ad3e (diff)
parent128e6ced247cda88f96fa9f2e4ba8b2c4a681560 (diff)
Merge ../linux-2.6
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig.debug4
-rw-r--r--lib/kobject.c14
-rw-r--r--lib/kobject_uevent.c8
3 files changed, 15 insertions, 11 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index d57fd9181b18..ccb0c1fdf1b5 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -101,7 +101,7 @@ config DEBUG_PREEMPT
101 101
102config DEBUG_MUTEXES 102config DEBUG_MUTEXES
103 bool "Mutex debugging, deadlock detection" 103 bool "Mutex debugging, deadlock detection"
104 default y 104 default n
105 depends on DEBUG_KERNEL 105 depends on DEBUG_KERNEL
106 help 106 help
107 This allows mutex semantics violations and mutex related deadlocks 107 This allows mutex semantics violations and mutex related deadlocks
@@ -189,7 +189,7 @@ config FRAME_POINTER
189config UNWIND_INFO 189config 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 25204a41a9b0..687ab418d292 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -128,6 +128,7 @@ void kobject_init(struct kobject * kobj)
128{ 128{
129 kref_init(&kobj->kref); 129 kref_init(&kobj->kref);
130 INIT_LIST_HEAD(&kobj->entry); 130 INIT_LIST_HEAD(&kobj->entry);
131 init_waitqueue_head(&kobj->poll);
131 kobj->kset = kset_get(kobj->kset); 132 kobj->kset = kset_get(kobj->kset);
132} 133}
133 134
@@ -197,14 +198,14 @@ int kobject_add(struct kobject * kobj)
197 198
198 /* be noisy on error issues */ 199 /* be noisy on error issues */
199 if (error == -EEXIST) 200 if (error == -EEXIST)
200 printk("kobject_add failed for %s with -EEXIST, " 201 pr_debug("kobject_add failed for %s with -EEXIST, "
201 "don't try to register things with the " 202 "don't try to register things with the "
202 "same name in the same directory.\n", 203 "same name in the same directory.\n",
203 kobject_name(kobj)); 204 kobject_name(kobj));
204 else 205 else
205 printk("kobject_add failed for %s (%d)\n", 206 pr_debug("kobject_add failed for %s (%d)\n",
206 kobject_name(kobj), error); 207 kobject_name(kobj), error);
207 dump_stack(); 208 /* dump_stack(); */
208 } 209 }
209 210
210 return error; 211 return error;
@@ -421,7 +422,6 @@ struct kobject *kobject_add_dir(struct kobject *parent, const char *name)
421 422
422 return k; 423 return k;
423} 424}
424EXPORT_SYMBOL_GPL(kobject_add_dir);
425 425
426/** 426/**
427 * kset_init - initialize a kset for use 427 * kset_init - initialize a kset for use
@@ -568,7 +568,7 @@ int subsys_create_file(struct subsystem * s, struct subsys_attribute * a)
568 * @s: subsystem. 568 * @s: subsystem.
569 * @a: attribute desciptor. 569 * @a: attribute desciptor.
570 */ 570 */
571 571#if 0
572void subsys_remove_file(struct subsystem * s, struct subsys_attribute * a) 572void subsys_remove_file(struct subsystem * s, struct subsys_attribute * a)
573{ 573{
574 if (subsys_get(s)) { 574 if (subsys_get(s)) {
@@ -576,6 +576,7 @@ void subsys_remove_file(struct subsystem * s, struct subsys_attribute * a)
576 subsys_put(s); 576 subsys_put(s);
577 } 577 }
578} 578}
579#endif /* 0 */
579 580
580EXPORT_SYMBOL(kobject_init); 581EXPORT_SYMBOL(kobject_init);
581EXPORT_SYMBOL(kobject_register); 582EXPORT_SYMBOL(kobject_register);
@@ -587,10 +588,7 @@ EXPORT_SYMBOL(kobject_del);
587 588
588EXPORT_SYMBOL(kset_register); 589EXPORT_SYMBOL(kset_register);
589EXPORT_SYMBOL(kset_unregister); 590EXPORT_SYMBOL(kset_unregister);
590EXPORT_SYMBOL(kset_find_obj);
591 591
592EXPORT_SYMBOL(subsystem_init);
593EXPORT_SYMBOL(subsystem_register); 592EXPORT_SYMBOL(subsystem_register);
594EXPORT_SYMBOL(subsystem_unregister); 593EXPORT_SYMBOL(subsystem_unregister);
595EXPORT_SYMBOL(subsys_create_file); 594EXPORT_SYMBOL(subsys_create_file);
596EXPORT_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)
29u64 uevent_seqnum; 29u64 uevent_seqnum;
30char uevent_helper[UEVENT_HELPER_PATH_LEN] = "/sbin/hotplug"; 30char uevent_helper[UEVENT_HELPER_PATH_LEN] = "/sbin/hotplug";
31static DEFINE_SPINLOCK(sequence_lock); 31static DEFINE_SPINLOCK(sequence_lock);
32#if defined(CONFIG_NET)
32static struct sock *uevent_sock; 33static struct sock *uevent_sock;
34#endif
33 35
34static char *action_to_string(enum kobject_action action) 36static 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}
250EXPORT_SYMBOL_GPL(add_uevent_var); 254EXPORT_SYMBOL_GPL(add_uevent_var);
251 255
256#if defined(CONFIG_NET)
252static int __init kobject_uevent_init(void) 257static 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
266postcore_initcall(kobject_uevent_init); 271postcore_initcall(kobject_uevent_init);
272#endif
267 273
268#endif /* CONFIG_HOTPLUG */ 274#endif /* CONFIG_HOTPLUG */