aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/bus.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-11-29 02:49:41 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 23:40:35 -0500
commit7dc72b2842381684b864750af31a5fb168dec764 (patch)
tree16746ac3f9836049705e1613480debb288c0068d /drivers/base/bus.c
parente5dd12784617f0f1fae5f96a7fac1ec4c49fadbe (diff)
Driver core: clean up debugging messages
The driver core debugging messages are a mess. This provides a unified message that makes them actually useful. The format for new kobject debug messages should be: driver/bus/class: 'OBJECT_NAME': FUNCTION_NAME: message.\n Note, the class code is not changed in this patch due to pending patches in my queue that this would conflict with. A later patch will clean them up. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/bus.c')
-rw-r--r--drivers/base/bus.c14
1 files changed, 7 insertions, 7 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
913bus_attrs_fail: 913bus_attrs_fail:
@@ -934,7 +934,7 @@ out:
934 */ 934 */
935void bus_unregister(struct bus_type * bus) 935void 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);