diff options
-rw-r--r-- | drivers/base/dd.c | 8 | ||||
-rw-r--r-- | include/linux/device.h | 2 |
2 files changed, 3 insertions, 7 deletions
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) | |||
172 | /** | 172 | /** |
173 | * wait_for_device_probe | 173 | * wait_for_device_probe |
174 | * Wait for device probing to be completed. | 174 | * Wait for device probing to be completed. |
175 | * | ||
176 | * Note: this function polls at 100 msec intervals. | ||
177 | */ | 175 | */ |
178 | int wait_for_device_probe(void) | 176 | void wait_for_device_probe(void) |
179 | { | 177 | { |
180 | /* wait for the known devices to complete their probing */ | 178 | /* wait for the known devices to complete their probing */ |
181 | while (driver_probe_done() != 0) | 179 | wait_event(probe_waitqueue, atomic_read(&probe_count) == 0); |
182 | msleep(100); | ||
183 | async_synchronize_full(); | 180 | async_synchronize_full(); |
184 | return 0; | ||
185 | } | 181 | } |
186 | 182 | ||
187 | /** | 183 | /** |
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); | |||
147 | extern struct device_driver *driver_find(const char *name, | 147 | extern struct device_driver *driver_find(const char *name, |
148 | struct bus_type *bus); | 148 | struct bus_type *bus); |
149 | extern int driver_probe_done(void); | 149 | extern int driver_probe_done(void); |
150 | extern int wait_for_device_probe(void); | 150 | extern void wait_for_device_probe(void); |
151 | 151 | ||
152 | 152 | ||
153 | /* sysfs interface for exporting driver attributes */ | 153 | /* sysfs interface for exporting driver attributes */ |