aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/kobject.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/kobject.c b/lib/kobject.c
index ff9491986b38..5df8441c44e7 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -184,8 +184,6 @@ int kobject_add(struct kobject * kobj)
184 unlink(kobj); 184 unlink(kobj);
185 if (parent) 185 if (parent)
186 kobject_put(parent); 186 kobject_put(parent);
187 } else {
188 kobject_hotplug(kobj, KOBJ_ADD);
189 } 187 }
190 188
191 return error; 189 return error;
@@ -207,7 +205,8 @@ int kobject_register(struct kobject * kobj)
207 printk("kobject_register failed for %s (%d)\n", 205 printk("kobject_register failed for %s (%d)\n",
208 kobject_name(kobj),error); 206 kobject_name(kobj),error);
209 dump_stack(); 207 dump_stack();
210 } 208 } else
209 kobject_hotplug(kobj, KOBJ_ADD);
211 } else 210 } else
212 error = -EINVAL; 211 error = -EINVAL;
213 return error; 212 return error;
@@ -301,7 +300,6 @@ int kobject_rename(struct kobject * kobj, char *new_name)
301 300
302void kobject_del(struct kobject * kobj) 301void kobject_del(struct kobject * kobj)
303{ 302{
304 kobject_hotplug(kobj, KOBJ_REMOVE);
305 sysfs_remove_dir(kobj); 303 sysfs_remove_dir(kobj);
306 unlink(kobj); 304 unlink(kobj);
307} 305}
@@ -314,6 +312,7 @@ void kobject_del(struct kobject * kobj)
314void kobject_unregister(struct kobject * kobj) 312void kobject_unregister(struct kobject * kobj)
315{ 313{
316 pr_debug("kobject %s: unregistering\n",kobject_name(kobj)); 314 pr_debug("kobject %s: unregistering\n",kobject_name(kobj));
315 kobject_hotplug(kobj, KOBJ_REMOVE);
317 kobject_del(kobj); 316 kobject_del(kobj);
318 kobject_put(kobj); 317 kobject_put(kobj);
319} 318}