aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/class.c')
-rw-r--r--drivers/base/class.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c
index 9947560def65..48b518e66bfc 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -144,7 +144,7 @@ int class_register(struct class *cls)
144 if (!cp) 144 if (!cp)
145 return -ENOMEM; 145 return -ENOMEM;
146 INIT_LIST_HEAD(&cp->class_devices); 146 INIT_LIST_HEAD(&cp->class_devices);
147 INIT_LIST_HEAD(&cp->interfaces); 147 INIT_LIST_HEAD(&cp->class_interfaces);
148 kset_init(&cp->class_dirs); 148 kset_init(&cp->class_dirs);
149 init_MUTEX(&cp->sem); 149 init_MUTEX(&cp->sem);
150 error = kobject_set_name(&cp->subsys.kobj, "%s", cls->name); 150 error = kobject_set_name(&cp->subsys.kobj, "%s", cls->name);
@@ -372,7 +372,7 @@ int class_interface_register(struct class_interface *class_intf)
372 return -EINVAL; 372 return -EINVAL;
373 373
374 down(&parent->p->sem); 374 down(&parent->p->sem);
375 list_add_tail(&class_intf->node, &parent->p->interfaces); 375 list_add_tail(&class_intf->node, &parent->p->class_interfaces);
376 if (class_intf->add_dev) { 376 if (class_intf->add_dev) {
377 list_for_each_entry(dev, &parent->p->class_devices, node) 377 list_for_each_entry(dev, &parent->p->class_devices, node)
378 class_intf->add_dev(dev, class_intf); 378 class_intf->add_dev(dev, class_intf);