]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Eliminate get_driver() and put_driver()
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 24 Jan 2012 18:35:37 +0000 (13:35 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 25 Jan 2012 00:00:36 +0000 (16:00 -0800)
Now that there are no users of get_driver() or put_driver(), this
patch (as1513) removes those routines completely.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/driver.c
include/linux/device.h

index e979cad75c6ed32754c59e2008d5f8f03df19fe9..60e4f77ca66286499959cccfdd83b4e4a36ff8a8 100644 (file)
@@ -153,34 +153,6 @@ int driver_add_kobj(struct device_driver *drv, struct kobject *kobj,
 }
 EXPORT_SYMBOL_GPL(driver_add_kobj);
 
-/**
- * get_driver - increment driver reference count.
- * @drv: driver.
- */
-struct device_driver *get_driver(struct device_driver *drv)
-{
-       if (drv) {
-               struct driver_private *priv;
-               struct kobject *kobj;
-
-               kobj = kobject_get(&drv->p->kobj);
-               priv = to_driver(kobj);
-               return priv->driver;
-       }
-       return NULL;
-}
-EXPORT_SYMBOL_GPL(get_driver);
-
-/**
- * put_driver - decrement driver's refcount.
- * @drv: driver.
- */
-void put_driver(struct device_driver *drv)
-{
-       kobject_put(&drv->p->kobj);
-}
-EXPORT_SYMBOL_GPL(put_driver);
-
 static int driver_add_groups(struct device_driver *drv,
                             const struct attribute_group **groups)
 {
index a782d7ff9e8bf602082652fec9bc800a3183330e..d28bd8295677619cc4703ab6e314bc10a7426ec7 100644 (file)
@@ -238,8 +238,6 @@ struct device_driver {
 extern int __must_check driver_register(struct device_driver *drv);
 extern void driver_unregister(struct device_driver *drv);
 
-extern struct device_driver *get_driver(struct device_driver *drv);
-extern void put_driver(struct device_driver *drv);
 extern struct device_driver *driver_find(const char *name,
                                         struct bus_type *bus);
 extern int driver_probe_done(void);