summaryrefslogtreecommitdiffstats
path: root/drivers/base/bus.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2002-04-09 12:14:34 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2007-04-27 10:57:29 -0700
commit74e9f5fa1570f956c96dd5d3f1053daedbbf01a0 (patch)
tree095bfed9efced3538507d16eb93010d91c074f5f /drivers/base/bus.c
parentc6a46696f97ff260a4ecce5e287f8de4b9d7fe14 (diff)
downloadop-kernel-dev-74e9f5fa1570f956c96dd5d3f1053daedbbf01a0.zip
op-kernel-dev-74e9f5fa1570f956c96dd5d3f1053daedbbf01a0.tar.gz
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 20b6dc8..1a5a350 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -63,8 +63,19 @@ static struct sysfs_ops driver_sysfs_ops = {
static void driver_release(struct kobject * kobj)
{
- struct device_driver * drv = to_driver(kobj);
- complete(&drv->unloaded);
+ /*
+ * Yes this is an empty release function, it is this way because struct
+ * device is always a static object, not a dynamic one. Yes, this is
+ * not nice and bad, but remember, drivers are code, reference counted
+ * by the module count, not a device, which is really data. And yes,
+ * in the future I do want to have all drivers be created dynamically,
+ * and am working toward that goal, but it will take a bit longer...
+ *
+ * But do not let this example give _anyone_ the idea that they can
+ * create a release function without any code in it at all, to do that
+ * is almost always wrong. If you have any questions about this,
+ * please send an email to <greg@kroah.com>
+ */
}
static struct kobj_type ktype_driver = {
OpenPOWER on IntegriCloud