diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 3f32df7ed373..0dfd08c15921 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -172,16 +172,12 @@ 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) +void wait_for_device_probe(void) { /* wait for the known devices to complete their probing */ - while (driver_probe_done() != 0) - msleep(100); + wait_event(probe_waitqueue, atomic_read(&probe_count) == 0); async_synchronize_full(); - return 0; } /** diff --git a/include/linux/device.h b/include/linux/device.h index d5706c448bcb..c56b154a0bf4 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -147,7 +147,7 @@ extern void put_driver(struct device_driver *drv); extern struct device_driver *driver_find(const char *name, struct bus_type *bus); extern int driver_probe_done(void); -extern int wait_for_device_probe(void); +extern void wait_for_device_probe(void); /* sysfs interface for exporting driver attributes */