aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/class.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2006-04-29 01:11:23 -0400
committerDmitry Torokhov <dtor_core@ameritech.net>2006-04-29 01:11:23 -0400
commit7b7e394185014e0f3bd8989cac937003f20ef9ce (patch)
tree3beda5f979bba0aa9822534e239cf1b45f3be69c /drivers/base/class.c
parentddc5d3414593e4d7ad7fbd33e7f7517fcc234544 (diff)
parent693f7d362055261882659475d2ef022e32edbff1 (diff)
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/base/class.c')
-rw-r--r--drivers/base/class.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c
index df7fdabd0730..0e71dff327cd 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -562,14 +562,13 @@ int class_device_add(struct class_device *class_dev)
562 kobject_uevent(&class_dev->kobj, KOBJ_ADD); 562 kobject_uevent(&class_dev->kobj, KOBJ_ADD);
563 563
564 /* notify any interfaces this device is now here */ 564 /* notify any interfaces this device is now here */
565 if (parent_class) { 565 down(&parent_class->sem);
566 down(&parent_class->sem); 566 list_add_tail(&class_dev->node, &parent_class->children);
567 list_add_tail(&class_dev->node, &parent_class->children); 567 list_for_each_entry(class_intf, &parent_class->interfaces, node) {
568 list_for_each_entry(class_intf, &parent_class->interfaces, node) 568 if (class_intf->add)
569 if (class_intf->add) 569 class_intf->add(class_dev, class_intf);
570 class_intf->add(class_dev, class_intf);
571 up(&parent_class->sem);
572 } 570 }
571 up(&parent_class->sem);
573 572
574 register_done: 573 register_done:
575 if (error) { 574 if (error) {