summaryrefslogtreecommitdiffstats
path: root/drivers/base/driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/driver.c')
-rw-r--r--drivers/base/driver.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 4250fb0912..37560fd46f 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -154,6 +154,7 @@ int register_device(struct device_d *new_device)
INIT_LIST_HEAD(&new_device->cdevs);
INIT_LIST_HEAD(&new_device->parameters);
INIT_LIST_HEAD(&new_device->active);
+ INIT_LIST_HEAD(&new_device->bus_list);
if (new_device->bus) {
if (!new_device->parent)
@@ -181,6 +182,8 @@ int unregister_device(struct device_d *old_dev)
dev_dbg(old_dev, "unregister\n");
+ dev_remove_parameters(old_dev);
+
if (old_dev->driver)
old_dev->bus->remove(old_dev);