aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/core.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-05-28 12:28:39 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-22 00:54:52 -0400
commitd9a0157328507c5f563e16a583cd0a063854aebb (patch)
treec309114c3408674cb3e719d2c626380c657a3d12 /drivers/base/core.c
parent1fbfee6c6dc0f4a4c587b6b163ee79643fc9aaa7 (diff)
class: rename "sem" to "class_sem" in internal class structure
This renames the struct class "sem" field to be "class_sem" to make things easier when struct bus_type and struct class merge in the future. It also makes grepping for fields easier as well. Based on an idea from Kay. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r--drivers/base/core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 6e1cff296d9f..b90ae6f7be86 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -907,7 +907,7 @@ int device_add(struct device *dev)
907 klist_add_tail(&dev->knode_parent, &parent->klist_children); 907 klist_add_tail(&dev->knode_parent, &parent->klist_children);
908 908
909 if (dev->class) { 909 if (dev->class) {
910 down(&dev->class->p->sem); 910 down(&dev->class->p->class_sem);
911 /* tie the class to the device */ 911 /* tie the class to the device */
912 list_add_tail(&dev->node, &dev->class->p->class_devices); 912 list_add_tail(&dev->node, &dev->class->p->class_devices);
913 913
@@ -916,7 +916,7 @@ int device_add(struct device *dev)
916 &dev->class->p->class_interfaces, node) 916 &dev->class->p->class_interfaces, node)
917 if (class_intf->add_dev) 917 if (class_intf->add_dev)
918 class_intf->add_dev(dev, class_intf); 918 class_intf->add_dev(dev, class_intf);
919 up(&dev->class->p->sem); 919 up(&dev->class->p->class_sem);
920 } 920 }
921 Done: 921 Done:
922 put_device(dev); 922 put_device(dev);
@@ -1017,7 +1017,7 @@ void device_del(struct device *dev)
1017 if (dev->class) { 1017 if (dev->class) {
1018 device_remove_class_symlinks(dev); 1018 device_remove_class_symlinks(dev);
1019 1019
1020 down(&dev->class->p->sem); 1020 down(&dev->class->p->class_sem);
1021 /* notify any interfaces that the device is now gone */ 1021 /* notify any interfaces that the device is now gone */
1022 list_for_each_entry(class_intf, 1022 list_for_each_entry(class_intf,
1023 &dev->class->p->class_interfaces, node) 1023 &dev->class->p->class_interfaces, node)
@@ -1025,7 +1025,7 @@ void device_del(struct device *dev)
1025 class_intf->remove_dev(dev, class_intf); 1025 class_intf->remove_dev(dev, class_intf);
1026 /* remove the device from the class list */ 1026 /* remove the device from the class list */
1027 list_del_init(&dev->node); 1027 list_del_init(&dev->node);
1028 up(&dev->class->p->sem); 1028 up(&dev->class->p->class_sem);
1029 } 1029 }
1030 device_remove_file(dev, &uevent_attr); 1030 device_remove_file(dev, &uevent_attr);
1031 device_remove_attrs(dev); 1031 device_remove_attrs(dev);