PM: runtime: Add safety net to supplier device release
[linux-2.6-microblaze.git] / drivers / base / core.c
index fd034d7..b191bd1 100644 (file)
@@ -485,8 +485,7 @@ static void device_link_release_fn(struct work_struct *work)
        /* Ensure that all references to the link object have been dropped. */
        device_link_synchronize_removal();
 
-       while (refcount_dec_not_one(&link->rpm_active))
-               pm_runtime_put(link->supplier);
+       pm_runtime_release_supplier(link, true);
 
        put_device(link->consumer);
        put_device(link->supplier);