drivercore: Fix ordering between deferred_probe and exiting initcalls
[linux-2.6.git] / drivers / base / dd.c
index 1b1cbb5..97fc774 100644 (file)
@@ -160,6 +160,8 @@ static int deferred_probe_initcall(void)
 
        driver_deferred_probe_enable = true;
        driver_deferred_probe_trigger();
+       /* Sort as many dependencies as possible before exiting initcalls */
+       flush_workqueue(deferred_wq);
        return 0;
 }
 late_initcall(deferred_probe_initcall);