diff options
Diffstat (limited to 'drivers/base/dd.c')
-rw-r--r-- | drivers/base/dd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index da57ee9d63fe..29917c7506cb 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c | |||
@@ -316,8 +316,7 @@ static void __device_release_driver(struct device *dev) | |||
316 | 316 | ||
317 | drv = dev->driver; | 317 | drv = dev->driver; |
318 | if (drv) { | 318 | if (drv) { |
319 | pm_runtime_get_noresume(dev); | 319 | pm_runtime_get_sync(dev); |
320 | pm_runtime_barrier(dev); | ||
321 | 320 | ||
322 | driver_sysfs_remove(dev); | 321 | driver_sysfs_remove(dev); |
323 | 322 | ||
@@ -326,6 +325,8 @@ static void __device_release_driver(struct device *dev) | |||
326 | BUS_NOTIFY_UNBIND_DRIVER, | 325 | BUS_NOTIFY_UNBIND_DRIVER, |
327 | dev); | 326 | dev); |
328 | 327 | ||
328 | pm_runtime_put_sync(dev); | ||
329 | |||
329 | if (dev->bus && dev->bus->remove) | 330 | if (dev->bus && dev->bus->remove) |
330 | dev->bus->remove(dev); | 331 | dev->bus->remove(dev); |
331 | else if (drv->remove) | 332 | else if (drv->remove) |
@@ -338,7 +339,6 @@ static void __device_release_driver(struct device *dev) | |||
338 | BUS_NOTIFY_UNBOUND_DRIVER, | 339 | BUS_NOTIFY_UNBOUND_DRIVER, |
339 | dev); | 340 | dev); |
340 | 341 | ||
341 | pm_runtime_put_sync(dev); | ||
342 | } | 342 | } |
343 | } | 343 | } |
344 | 344 | ||