X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=drivers%2Fbase%2Fdd.c;h=1352312391032fcda76f672c5b43a76e5c6df6f0;hb=1d8ce7bc4d05b4a5c04dc17f92fef26989fb5935;hp=315bed8d5e7fc5e33d1ea10e9f4c084e03428036;hpb=cda5e83fdea476dce9c0a9b1152cd6ca46832cc4;p=safe%2Fjmp%2Flinux-2.6 diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 315bed8..1352312 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -18,9 +18,11 @@ */ #include +#include #include #include #include +#include #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