]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
driver core: remove polling for driver_probe_done(v5)
authorMing Lei <tom.leiming@gmail.com>
Sat, 21 Feb 2009 08:45:07 +0000 (16:45 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 24 Mar 2009 23:38:25 +0000 (16:38 -0700)
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>
drivers/base/dd.c
include/linux/device.h

index 3f32df7ed37340df520bb36fba3db67883e23be4..0dfd08c15921fd5c610cda5e4b23b23de626e3db 100644 (file)
@@ -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;
 }
 
 /**
index d5706c448bcb7c45b0f83f2ea46bfddc28673d5b..c56b154a0bf4f9352c1f277cc551aa9a8acf2532 100644 (file)
@@ -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 */