diff options
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r-- | drivers/base/core.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 8c2cc2648f5a..14aa2b6953c9 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -119,7 +119,7 @@ static void device_release(struct kobject *kobj) | |||
119 | else | 119 | else |
120 | WARN(1, KERN_ERR "Device '%s' does not have a release() " | 120 | WARN(1, KERN_ERR "Device '%s' does not have a release() " |
121 | "function, it is broken and must be fixed.\n", | 121 | "function, it is broken and must be fixed.\n", |
122 | dev->bus_id); | 122 | dev_name(dev)); |
123 | } | 123 | } |
124 | 124 | ||
125 | static struct kobj_type device_ktype = { | 125 | static struct kobj_type device_ktype = { |
@@ -209,7 +209,7 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj, | |||
209 | retval = dev->bus->uevent(dev, env); | 209 | retval = dev->bus->uevent(dev, env); |
210 | if (retval) | 210 | if (retval) |
211 | pr_debug("device: '%s': %s: bus uevent() returned %d\n", | 211 | pr_debug("device: '%s': %s: bus uevent() returned %d\n", |
212 | dev->bus_id, __func__, retval); | 212 | dev_name(dev), __func__, retval); |
213 | } | 213 | } |
214 | 214 | ||
215 | /* have the class specific function add its stuff */ | 215 | /* have the class specific function add its stuff */ |
@@ -217,7 +217,7 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj, | |||
217 | retval = dev->class->dev_uevent(dev, env); | 217 | retval = dev->class->dev_uevent(dev, env); |
218 | if (retval) | 218 | if (retval) |
219 | pr_debug("device: '%s': %s: class uevent() " | 219 | pr_debug("device: '%s': %s: class uevent() " |
220 | "returned %d\n", dev->bus_id, | 220 | "returned %d\n", dev_name(dev), |
221 | __func__, retval); | 221 | __func__, retval); |
222 | } | 222 | } |
223 | 223 | ||
@@ -226,7 +226,7 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj, | |||
226 | retval = dev->type->uevent(dev, env); | 226 | retval = dev->type->uevent(dev, env); |
227 | if (retval) | 227 | if (retval) |
228 | pr_debug("device: '%s': %s: dev_type uevent() " | 228 | pr_debug("device: '%s': %s: dev_type uevent() " |
229 | "returned %d\n", dev->bus_id, | 229 | "returned %d\n", dev_name(dev), |
230 | __func__, retval); | 230 | __func__, retval); |
231 | } | 231 | } |
232 | 232 | ||
@@ -672,7 +672,7 @@ static int device_add_class_symlinks(struct device *dev) | |||
672 | if (dev->kobj.parent != &dev->class->p->class_subsys.kobj && | 672 | if (dev->kobj.parent != &dev->class->p->class_subsys.kobj && |
673 | device_is_not_partition(dev)) { | 673 | device_is_not_partition(dev)) { |
674 | error = sysfs_create_link(&dev->class->p->class_subsys.kobj, | 674 | error = sysfs_create_link(&dev->class->p->class_subsys.kobj, |
675 | &dev->kobj, dev->bus_id); | 675 | &dev->kobj, dev_name(dev)); |
676 | if (error) | 676 | if (error) |
677 | goto out_subsys; | 677 | goto out_subsys; |
678 | } | 678 | } |
@@ -712,11 +712,11 @@ out_busid: | |||
712 | if (dev->kobj.parent != &dev->class->p->class_subsys.kobj && | 712 | if (dev->kobj.parent != &dev->class->p->class_subsys.kobj && |
713 | device_is_not_partition(dev)) | 713 | device_is_not_partition(dev)) |
714 | sysfs_remove_link(&dev->class->p->class_subsys.kobj, | 714 | sysfs_remove_link(&dev->class->p->class_subsys.kobj, |
715 | dev->bus_id); | 715 | dev_name(dev)); |
716 | #else | 716 | #else |
717 | /* link in the class directory pointing to the device */ | 717 | /* link in the class directory pointing to the device */ |
718 | error = sysfs_create_link(&dev->class->p->class_subsys.kobj, | 718 | error = sysfs_create_link(&dev->class->p->class_subsys.kobj, |
719 | &dev->kobj, dev->bus_id); | 719 | &dev->kobj, dev_name(dev)); |
720 | if (error) | 720 | if (error) |
721 | goto out_subsys; | 721 | goto out_subsys; |
722 | 722 | ||
@@ -729,7 +729,7 @@ out_busid: | |||
729 | return 0; | 729 | return 0; |
730 | 730 | ||
731 | out_busid: | 731 | out_busid: |
732 | sysfs_remove_link(&dev->class->p->class_subsys.kobj, dev->bus_id); | 732 | sysfs_remove_link(&dev->class->p->class_subsys.kobj, dev_name(dev)); |
733 | #endif | 733 | #endif |
734 | 734 | ||
735 | out_subsys: | 735 | out_subsys: |
@@ -758,12 +758,12 @@ static void device_remove_class_symlinks(struct device *dev) | |||
758 | if (dev->kobj.parent != &dev->class->p->class_subsys.kobj && | 758 | if (dev->kobj.parent != &dev->class->p->class_subsys.kobj && |
759 | device_is_not_partition(dev)) | 759 | device_is_not_partition(dev)) |
760 | sysfs_remove_link(&dev->class->p->class_subsys.kobj, | 760 | sysfs_remove_link(&dev->class->p->class_subsys.kobj, |
761 | dev->bus_id); | 761 | dev_name(dev)); |
762 | #else | 762 | #else |
763 | if (dev->parent && device_is_not_partition(dev)) | 763 | if (dev->parent && device_is_not_partition(dev)) |
764 | sysfs_remove_link(&dev->kobj, "device"); | 764 | sysfs_remove_link(&dev->kobj, "device"); |
765 | 765 | ||
766 | sysfs_remove_link(&dev->class->p->class_subsys.kobj, dev->bus_id); | 766 | sysfs_remove_link(&dev->class->p->class_subsys.kobj, dev_name(dev)); |
767 | #endif | 767 | #endif |
768 | 768 | ||
769 | sysfs_remove_link(&dev->kobj, "subsystem"); | 769 | sysfs_remove_link(&dev->kobj, "subsystem"); |
@@ -866,7 +866,7 @@ int device_add(struct device *dev) | |||
866 | if (!strlen(dev->bus_id)) | 866 | if (!strlen(dev->bus_id)) |
867 | goto done; | 867 | goto done; |
868 | 868 | ||
869 | pr_debug("device: '%s': %s\n", dev->bus_id, __func__); | 869 | pr_debug("device: '%s': %s\n", dev_name(dev), __func__); |
870 | 870 | ||
871 | parent = get_device(dev->parent); | 871 | parent = get_device(dev->parent); |
872 | setup_parent(dev, parent); | 872 | setup_parent(dev, parent); |
@@ -876,7 +876,7 @@ int device_add(struct device *dev) | |||
876 | set_dev_node(dev, dev_to_node(parent)); | 876 | set_dev_node(dev, dev_to_node(parent)); |
877 | 877 | ||
878 | /* first, register with generic layer. */ | 878 | /* first, register with generic layer. */ |
879 | error = kobject_add(&dev->kobj, dev->kobj.parent, "%s", dev->bus_id); | 879 | error = kobject_add(&dev->kobj, dev->kobj.parent, "%s", dev_name(dev)); |
880 | if (error) | 880 | if (error) |
881 | goto Error; | 881 | goto Error; |
882 | 882 | ||
@@ -1086,7 +1086,7 @@ void device_del(struct device *dev) | |||
1086 | */ | 1086 | */ |
1087 | void device_unregister(struct device *dev) | 1087 | void device_unregister(struct device *dev) |
1088 | { | 1088 | { |
1089 | pr_debug("device: '%s': %s\n", dev->bus_id, __func__); | 1089 | pr_debug("device: '%s': %s\n", dev_name(dev), __func__); |
1090 | device_del(dev); | 1090 | device_del(dev); |
1091 | put_device(dev); | 1091 | put_device(dev); |
1092 | } | 1092 | } |
@@ -1199,7 +1199,7 @@ EXPORT_SYMBOL_GPL(device_remove_file); | |||
1199 | 1199 | ||
1200 | static void device_create_release(struct device *dev) | 1200 | static void device_create_release(struct device *dev) |
1201 | { | 1201 | { |
1202 | pr_debug("device: '%s': %s\n", dev->bus_id, __func__); | 1202 | pr_debug("device: '%s': %s\n", dev_name(dev), __func__); |
1203 | kfree(dev); | 1203 | kfree(dev); |
1204 | } | 1204 | } |
1205 | 1205 | ||
@@ -1344,7 +1344,7 @@ int device_rename(struct device *dev, char *new_name) | |||
1344 | if (!dev) | 1344 | if (!dev) |
1345 | return -EINVAL; | 1345 | return -EINVAL; |
1346 | 1346 | ||
1347 | pr_debug("device: '%s': %s: renaming to '%s'\n", dev->bus_id, | 1347 | pr_debug("device: '%s': %s: renaming to '%s'\n", dev_name(dev), |
1348 | __func__, new_name); | 1348 | __func__, new_name); |
1349 | 1349 | ||
1350 | #ifdef CONFIG_SYSFS_DEPRECATED | 1350 | #ifdef CONFIG_SYSFS_DEPRECATED |
@@ -1381,7 +1381,7 @@ int device_rename(struct device *dev, char *new_name) | |||
1381 | #else | 1381 | #else |
1382 | if (dev->class) { | 1382 | if (dev->class) { |
1383 | error = sysfs_create_link_nowarn(&dev->class->p->class_subsys.kobj, | 1383 | error = sysfs_create_link_nowarn(&dev->class->p->class_subsys.kobj, |
1384 | &dev->kobj, dev->bus_id); | 1384 | &dev->kobj, dev_name(dev)); |
1385 | if (error) | 1385 | if (error) |
1386 | goto out; | 1386 | goto out; |
1387 | sysfs_remove_link(&dev->class->p->class_subsys.kobj, | 1387 | sysfs_remove_link(&dev->class->p->class_subsys.kobj, |
@@ -1459,8 +1459,8 @@ int device_move(struct device *dev, struct device *new_parent) | |||
1459 | new_parent = get_device(new_parent); | 1459 | new_parent = get_device(new_parent); |
1460 | new_parent_kobj = get_device_parent(dev, new_parent); | 1460 | new_parent_kobj = get_device_parent(dev, new_parent); |
1461 | 1461 | ||
1462 | pr_debug("device: '%s': %s: moving to '%s'\n", dev->bus_id, | 1462 | pr_debug("device: '%s': %s: moving to '%s'\n", dev_name(dev), |
1463 | __func__, new_parent ? new_parent->bus_id : "<NULL>"); | 1463 | __func__, new_parent ? dev_name(new_parent) : "<NULL>"); |
1464 | error = kobject_move(&dev->kobj, new_parent_kobj); | 1464 | error = kobject_move(&dev->kobj, new_parent_kobj); |
1465 | if (error) { | 1465 | if (error) { |
1466 | cleanup_glue_dir(dev, new_parent_kobj); | 1466 | cleanup_glue_dir(dev, new_parent_kobj); |