summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
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)
kobject_uevent(&priv->kobj, KOBJ_ADD);
return error;
out_unregister:
- kobject_unregister(&priv->kobj);
+ kobject_put(&priv->kobj);
out_put_bus:
bus_put(bus);
return error;
@@ -708,7 +708,7 @@ void bus_remove_driver(struct device_driver * drv)
pr_debug("bus: '%s': remove driver %s\n", drv->bus->name, drv->name);
driver_detach(drv);
module_remove_driver(drv);
- kobject_unregister(&drv->p->kobj);
+ kobject_put(&drv->p->kobj);
bus_put(drv->bus);
}
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)
}
mutex_unlock(&sysdev_drivers_lock);
- kobject_unregister(&sysdev->kobj);
+ kobject_put(&sysdev->kobj);
}
OpenPOWER on IntegriCloud