diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-03-10 15:17:26 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-03-10 15:17:26 +0900 |
commit | e161183ba674f97fce748384f5bb037d07bdc5c9 (patch) | |
tree | 5b3bd4b995f6435ee977b71082244fa1a647f717 /drivers/base/dd.c | |
parent | 2ef7f0dab6b3d171b6aff00a47077385ae3155b5 (diff) | |
parent | 99adcd9d67aaf04e28f5ae96df280f236bde4b66 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
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 315bed8d5e7..13523123910 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 |