aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-12-20 11:13:05 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 23:40:40 -0500
commitc10997f6575f476ff38442fa18fd4a0d80345f9d (patch)
tree9b2bb7e647bd39fb80f23d7a6b34bf2587d660a7 /drivers/base
parent38a382ae5dd4f4d04e3046816b0a41836094e538 (diff)
Kobject: convert drivers/* from kobject_unregister() to kobject_put()
There is no need for kobject_unregister() anymore, thanks to Kay's kobject cleanup changes, so replace all instances of it with kobject_put(). Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/bus.c4
-rw-r--r--drivers/base/sys.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index aea579365f6d..a377b65ba328 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -681,7 +681,7 @@ int bus_add_driver(struct device_driver *drv)
681 kobject_uevent(&priv->kobj, KOBJ_ADD); 681 kobject_uevent(&priv->kobj, KOBJ_ADD);
682 return error; 682 return error;
683out_unregister: 683out_unregister:
684 kobject_unregister(&priv->kobj); 684 kobject_put(&priv->kobj);
685out_put_bus: 685out_put_bus:
686 bus_put(bus); 686 bus_put(bus);
687 return error; 687 return error;
@@ -708,7 +708,7 @@ void bus_remove_driver(struct device_driver * drv)
708 pr_debug("bus: '%s': remove driver %s\n", drv->bus->name, drv->name); 708 pr_debug("bus: '%s': remove driver %s\n", drv->bus->name, drv->name);
709 driver_detach(drv); 709 driver_detach(drv);
710 module_remove_driver(drv); 710 module_remove_driver(drv);
711 kobject_unregister(&drv->p->kobj); 711 kobject_put(&drv->p->kobj);
712 bus_put(drv->bus); 712 bus_put(drv->bus);
713} 713}
714 714
diff --git a/drivers/base/sys.c b/drivers/base/sys.c
index 47fc6eb6473f..e666441dd76b 100644
--- a/drivers/base/sys.c
+++ b/drivers/base/sys.c
@@ -264,7 +264,7 @@ void sysdev_unregister(struct sys_device * sysdev)
264 } 264 }
265 mutex_unlock(&sysdev_drivers_lock); 265 mutex_unlock(&sysdev_drivers_lock);
266 266
267 kobject_unregister(&sysdev->kobj); 267 kobject_put(&sysdev->kobj);
268} 268}
269 269
270 270