diff options
-rw-r--r-- | drivers/base/bus.c | 14 | ||||
-rw-r--r-- | drivers/base/core.c | 23 | ||||
-rw-r--r-- | drivers/base/dd.c | 16 |
3 files changed, 28 insertions, 25 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index aa0c986c323a..937fc100b64a 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c | |||
@@ -80,7 +80,7 @@ static void driver_release(struct kobject *kobj) | |||
80 | { | 80 | { |
81 | struct driver_private *drv_priv = to_driver(kobj); | 81 | struct driver_private *drv_priv = to_driver(kobj); |
82 | 82 | ||
83 | pr_debug("%s: freeing %s\n", __FUNCTION__, kobject_name(kobj)); | 83 | pr_debug("driver: '%s': %s\n", kobject_name(kobj), __FUNCTION__); |
84 | kfree(drv_priv); | 84 | kfree(drv_priv); |
85 | } | 85 | } |
86 | 86 | ||
@@ -446,7 +446,7 @@ int bus_add_device(struct device * dev) | |||
446 | int error = 0; | 446 | int error = 0; |
447 | 447 | ||
448 | if (bus) { | 448 | if (bus) { |
449 | pr_debug("bus %s: add device %s\n", bus->name, dev->bus_id); | 449 | pr_debug("bus: '%s': add device %s\n", bus->name, dev->bus_id); |
450 | error = device_add_attrs(bus, dev); | 450 | error = device_add_attrs(bus, dev); |
451 | if (error) | 451 | if (error) |
452 | goto out_put; | 452 | goto out_put; |
@@ -519,7 +519,7 @@ void bus_remove_device(struct device * dev) | |||
519 | dev->is_registered = 0; | 519 | dev->is_registered = 0; |
520 | klist_del(&dev->knode_bus); | 520 | klist_del(&dev->knode_bus); |
521 | } | 521 | } |
522 | pr_debug("bus %s: remove device %s\n", dev->bus->name, dev->bus_id); | 522 | pr_debug("bus: '%s': remove device %s\n", dev->bus->name, dev->bus_id); |
523 | device_release_driver(dev); | 523 | device_release_driver(dev); |
524 | bus_put(dev->bus); | 524 | bus_put(dev->bus); |
525 | } | 525 | } |
@@ -637,7 +637,7 @@ int bus_add_driver(struct device_driver *drv) | |||
637 | if (!bus) | 637 | if (!bus) |
638 | return -EINVAL; | 638 | return -EINVAL; |
639 | 639 | ||
640 | pr_debug("bus %s: add driver %s\n", bus->name, drv->name); | 640 | pr_debug("bus: '%s': add driver %s\n", bus->name, drv->name); |
641 | 641 | ||
642 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); | 642 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); |
643 | if (!priv) | 643 | if (!priv) |
@@ -707,7 +707,7 @@ void bus_remove_driver(struct device_driver * drv) | |||
707 | driver_remove_attrs(drv->bus, drv); | 707 | driver_remove_attrs(drv->bus, drv); |
708 | driver_remove_file(drv, &driver_attr_uevent); | 708 | driver_remove_file(drv, &driver_attr_uevent); |
709 | klist_remove(&drv->p->knode_bus); | 709 | klist_remove(&drv->p->knode_bus); |
710 | pr_debug("bus %s: remove driver %s\n", drv->bus->name, drv->name); | 710 | pr_debug("bus: '%s': remove driver %s\n", drv->bus->name, drv->name); |
711 | driver_detach(drv); | 711 | driver_detach(drv); |
712 | module_remove_driver(drv); | 712 | module_remove_driver(drv); |
713 | kobject_unregister(&drv->p->kobj); | 713 | kobject_unregister(&drv->p->kobj); |
@@ -907,7 +907,7 @@ int bus_register(struct bus_type * bus) | |||
907 | if (retval) | 907 | if (retval) |
908 | goto bus_attrs_fail; | 908 | goto bus_attrs_fail; |
909 | 909 | ||
910 | pr_debug("bus type '%s' registered\n", bus->name); | 910 | pr_debug("bus: '%s': registered\n", bus->name); |
911 | return 0; | 911 | return 0; |
912 | 912 | ||
913 | bus_attrs_fail: | 913 | bus_attrs_fail: |
@@ -934,7 +934,7 @@ out: | |||
934 | */ | 934 | */ |
935 | void bus_unregister(struct bus_type * bus) | 935 | void bus_unregister(struct bus_type * bus) |
936 | { | 936 | { |
937 | pr_debug("bus %s: unregistering\n", bus->name); | 937 | pr_debug("bus: '%s': unregistering\n", bus->name); |
938 | bus_remove_attrs(bus); | 938 | bus_remove_attrs(bus); |
939 | remove_probe_files(bus); | 939 | remove_probe_files(bus); |
940 | kset_unregister(bus->p->drivers_kset); | 940 | kset_unregister(bus->p->drivers_kset); |
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 | */ |
1021 | void device_unregister(struct device * dev) | 1023 | void 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 | ||
1117 | static void device_create_release(struct device *dev) | 1119 | static 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); |
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 87a348ce818c..54922647522d 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c | |||
@@ -34,8 +34,8 @@ static void driver_bound(struct device *dev) | |||
34 | return; | 34 | return; |
35 | } | 35 | } |
36 | 36 | ||
37 | pr_debug("bound device '%s' to driver '%s'\n", | 37 | pr_debug("driver: '%s': %s: bound to device '%s'\n", dev->bus_id, |
38 | dev->bus_id, dev->driver->name); | 38 | __FUNCTION__, dev->driver->name); |
39 | 39 | ||
40 | if (dev->bus) | 40 | if (dev->bus) |
41 | blocking_notifier_call_chain(&dev->bus->p->bus_notifier, | 41 | blocking_notifier_call_chain(&dev->bus->p->bus_notifier, |
@@ -102,8 +102,8 @@ static int really_probe(struct device *dev, struct device_driver *drv) | |||
102 | int ret = 0; | 102 | int ret = 0; |
103 | 103 | ||
104 | atomic_inc(&probe_count); | 104 | atomic_inc(&probe_count); |
105 | pr_debug("%s: Probing driver %s with device %s\n", | 105 | pr_debug("bus: '%s': %s: probing driver %s with device %s\n", |
106 | drv->bus->name, drv->name, dev->bus_id); | 106 | drv->bus->name, __FUNCTION__, drv->name, dev->bus_id); |
107 | WARN_ON(!list_empty(&dev->devres_head)); | 107 | WARN_ON(!list_empty(&dev->devres_head)); |
108 | 108 | ||
109 | dev->driver = drv; | 109 | dev->driver = drv; |
@@ -125,8 +125,8 @@ static int really_probe(struct device *dev, struct device_driver *drv) | |||
125 | 125 | ||
126 | driver_bound(dev); | 126 | driver_bound(dev); |
127 | ret = 1; | 127 | ret = 1; |
128 | pr_debug("%s: Bound Device %s to Driver %s\n", | 128 | pr_debug("bus: '%s': %s: bound device %s to driver %s\n", |
129 | drv->bus->name, dev->bus_id, drv->name); | 129 | drv->bus->name, __FUNCTION__, dev->bus_id, drv->name); |
130 | goto done; | 130 | goto done; |
131 | 131 | ||
132 | probe_failed: | 132 | probe_failed: |
@@ -192,8 +192,8 @@ int driver_probe_device(struct device_driver * drv, struct device * dev) | |||
192 | if (drv->bus->match && !drv->bus->match(dev, drv)) | 192 | if (drv->bus->match && !drv->bus->match(dev, drv)) |
193 | goto done; | 193 | goto done; |
194 | 194 | ||
195 | pr_debug("%s: Matched Device %s with Driver %s\n", | 195 | pr_debug("bus: '%s': %s: matched device %s with driver %s\n", |
196 | drv->bus->name, dev->bus_id, drv->name); | 196 | drv->bus->name, __FUNCTION__, dev->bus_id, drv->name); |
197 | 197 | ||
198 | ret = really_probe(dev, drv); | 198 | ret = really_probe(dev, drv); |
199 | 199 | ||