aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/dd.c
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2009-02-21 03:45:07 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-03-24 19:38:25 -0400
commitb23530ebc339c4092ae2c9f37341a5398fea8b89 (patch)
treec8f45452c649273271ac292715d4a76baa5e9148 /drivers/base/dd.c
parent04256b4a8fc73f54cd14f20867882c299728a446 (diff)
driver core: remove polling for driver_probe_done(v5)
This patch removes 100ms polling for driver_probe_done in wait_for_device_probe(), and uses wait_event() instead. Removing polling in fs initialization may lead to a faster boot. This patch also changes the return type of wait_for_device_done() from int to void. This patch is against Arjan's patch in linux-next tree. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/dd.c')
-rw-r--r--drivers/base/dd.c8
1 files changed, 2 insertions, 6 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 */
178int wait_for_device_probe(void) 176void 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/**