aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/bus.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2002-04-09 15:14:34 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-04-27 13:57:29 -0400
commit74e9f5fa1570f956c96dd5d3f1053daedbbf01a0 (patch)
tree095bfed9efced3538507d16eb93010d91c074f5f /drivers/base/bus.c
parentc6a46696f97ff260a4ecce5e287f8de4b9d7fe14 (diff)
Driver core: remove unneeded completion from driver release path
The completion in the driver release path is due to ancient history in the _very_ early 2.5 days when we were not tracking the module reference count of attributes. It is not needed at all and can be removed. Note, we now have an empty release function for the driver structure. This is due to the fact that drivers are statically allocated in the system at this point in time, something which I want to change in the future. But remember, drivers are really code, which is reference counted by the module, unlike devices, which are data and _must_ be reference counted properly in order to work correctly. 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.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 20b6dc8706fa..1a5a350eca15 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -63,8 +63,19 @@ static struct sysfs_ops driver_sysfs_ops = {
63 63
64static void driver_release(struct kobject * kobj) 64static void driver_release(struct kobject * kobj)
65{ 65{
66 struct device_driver * drv = to_driver(kobj); 66 /*
67 complete(&drv->unloaded); 67 * Yes this is an empty release function, it is this way because struct
68 * device is always a static object, not a dynamic one. Yes, this is
69 * not nice and bad, but remember, drivers are code, reference counted
70 * by the module count, not a device, which is really data. And yes,
71 * in the future I do want to have all drivers be created dynamically,
72 * and am working toward that goal, but it will take a bit longer...
73 *
74 * But do not let this example give _anyone_ the idea that they can
75 * create a release function without any code in it at all, to do that
76 * is almost always wrong. If you have any questions about this,
77 * please send an email to <greg@kroah.com>
78 */
68} 79}
69 80
70static struct kobj_type ktype_driver = { 81static struct kobj_type ktype_driver = {