diff options
Diffstat (limited to 'drivers/base/dd.c')
-rw-r--r-- | drivers/base/dd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 6a2aa8562..ad05eaf82 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -995,8 +995,6 @@ static void __device_release_driver(struct device *dev, struct device *parent) else if (drv->remove) drv->remove(dev); - device_links_driver_cleanup(dev); - devres_release_all(dev); dma_deconfigure(dev); dev->driver = NULL; @@ -1006,6 +1004,8 @@ static void __device_release_driver(struct device *dev, struct device *parent) pm_runtime_reinit(dev); dev_pm_set_driver_flags(dev, 0); + device_links_driver_cleanup(dev); + klist_remove(&dev->p->knode_driver); device_pm_check_callbacks(dev); if (dev->bus) |