aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r--drivers/base/core.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 414a480e10a3..22fdf320a2a6 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -193,15 +193,16 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj,
193 if (dev->bus && dev->bus->uevent) { 193 if (dev->bus && dev->bus->uevent) {
194 retval = dev->bus->uevent(dev, env); 194 retval = dev->bus->uevent(dev, env);
195 if (retval) 195 if (retval)
196 pr_debug ("%s: bus uevent() returned %d\n", 196 pr_debug("device: '%s': %s: bus uevent() returned %d\n",
197 __FUNCTION__, retval); 197 dev->bus_id, __FUNCTION__, retval);
198 } 198 }
199 199
200 /* have the class specific function add its stuff */ 200 /* have the class specific function add its stuff */
201 if (dev->class && dev->class->dev_uevent) { 201 if (dev->class && dev->class->dev_uevent) {
202 retval = dev->class->dev_uevent(dev, env); 202 retval = dev->class->dev_uevent(dev, env);
203 if (retval) 203 if (retval)
204 pr_debug("%s: class uevent() returned %d\n", 204 pr_debug("device: '%s': %s: class uevent() "
205 "returned %d\n", dev->bus_id,
205 __FUNCTION__, retval); 206 __FUNCTION__, retval);
206 } 207 }
207 208
@@ -209,7 +210,8 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj,
209 if (dev->type && dev->type->uevent) { 210 if (dev->type && dev->type->uevent) {
210 retval = dev->type->uevent(dev, env); 211 retval = dev->type->uevent(dev, env);
211 if (retval) 212 if (retval)
212 pr_debug("%s: dev_type uevent() returned %d\n", 213 pr_debug("device: '%s': %s: dev_type uevent() "
214 "returned %d\n", dev->bus_id,
213 __FUNCTION__, retval); 215 __FUNCTION__, retval);
214 } 216 }
215 217
@@ -751,7 +753,7 @@ int device_add(struct device *dev)
751 goto Error; 753 goto Error;
752 } 754 }
753 755
754 pr_debug("DEV: registering device: ID = '%s'\n", dev->bus_id); 756 pr_debug("device: '%s': %s\n", dev->bus_id, __FUNCTION__);
755 757
756 parent = get_device(dev->parent); 758 parent = get_device(dev->parent);
757 error = setup_parent(dev, parent); 759 error = setup_parent(dev, parent);
@@ -1020,7 +1022,7 @@ void device_del(struct device * dev)
1020 */ 1022 */
1021void device_unregister(struct device * dev) 1023void device_unregister(struct device * dev)
1022{ 1024{
1023 pr_debug("DEV: Unregistering device. ID = '%s'\n", dev->bus_id); 1025 pr_debug("device: '%s': %s\n", dev->bus_id, __FUNCTION__);
1024 device_del(dev); 1026 device_del(dev);
1025 put_device(dev); 1027 put_device(dev);
1026} 1028}
@@ -1116,7 +1118,7 @@ EXPORT_SYMBOL_GPL(device_remove_file);
1116 1118
1117static void device_create_release(struct device *dev) 1119static void device_create_release(struct device *dev)
1118{ 1120{
1119 pr_debug("%s called for %s\n", __FUNCTION__, dev->bus_id); 1121 pr_debug("device: '%s': %s\n", dev->bus_id, __FUNCTION__);
1120 kfree(dev); 1122 kfree(dev);
1121} 1123}
1122 1124
@@ -1259,7 +1261,8 @@ int device_rename(struct device *dev, char *new_name)
1259 if (!dev) 1261 if (!dev)
1260 return -EINVAL; 1262 return -EINVAL;
1261 1263
1262 pr_debug("DEVICE: renaming '%s' to '%s'\n", dev->bus_id, new_name); 1264 pr_debug("device: '%s': %s: renaming to '%s'\n", dev->bus_id,
1265 __FUNCTION__, new_name);
1263 1266
1264#ifdef CONFIG_SYSFS_DEPRECATED 1267#ifdef CONFIG_SYSFS_DEPRECATED
1265 if ((dev->class) && (dev->parent)) 1268 if ((dev->class) && (dev->parent))
@@ -1378,8 +1381,8 @@ int device_move(struct device *dev, struct device *new_parent)
1378 put_device(new_parent); 1381 put_device(new_parent);
1379 goto out; 1382 goto out;
1380 } 1383 }
1381 pr_debug("DEVICE: moving '%s' to '%s'\n", dev->bus_id, 1384 pr_debug("device: '%s': %s: moving to '%s'\n", dev->bus_id,
1382 new_parent ? new_parent->bus_id : "<NULL>"); 1385 __FUNCTION__, new_parent ? new_parent->bus_id : "<NULL>");
1383 error = kobject_move(&dev->kobj, new_parent_kobj); 1386 error = kobject_move(&dev->kobj, new_parent_kobj);
1384 if (error) { 1387 if (error) {
1385 put_device(new_parent); 1388 put_device(new_parent);