diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-03-03 00:08:56 +0300 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-03-03 00:08:56 +0300 |
| commit | c02368a9d059322f913a58111eade87a656fefd5 (patch) | |
| tree | 2f02dbbe69b86535f58d2010d9adfb20a9c16fb9 /drivers/base/dd.c | |
| parent | f17c75453b2d195eba0a90d9f16a3ba88c85b3b4 (diff) | |
| parent | 778ef1e6cbb049c9bcbf405936ee6f2b6e451892 (diff) | |
| download | linux-c02368a9d059322f913a58111eade87a656fefd5.tar.xz | |
Merge branch 'linus' into irq/genirq
Diffstat (limited to 'drivers/base/dd.c')
| -rw-r--r-- | drivers/base/dd.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 315bed8d5e7f..135231239103 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -18,9 +18,11 @@ */ #include <linux/device.h> +#include <linux/delay.h> #include <linux/module.h> #include <linux/kthread.h> #include <linux/wait.h> +#include <linux/async.h> #include "base.h" #include "power/power.h" @@ -168,6 +170,21 @@ int driver_probe_done(void) } /** + * wait_for_device_probe + * Wait for device probing to be completed. + * + * Note: this function polls at 100 msec intervals. + */ +int wait_for_device_probe(void) +{ + /* wait for the known devices to complete their probing */ + while (driver_probe_done() != 0) + msleep(100); + async_synchronize_full(); + return 0; +} + +/** * driver_probe_device - attempt to bind device & driver together * @drv: driver to bind a device to * @dev: device to try to bind to the driver |
