aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@canonical.com>2009-12-02 14:41:53 +0000
committerLeann Ogasawara <leann.ogasawara@canonical.com>2012-05-21 06:44:29 -0700
commit9b810d8d530bdb748107f9caea8d66462fcff37d (patch)
tree282be1e9d11a9820aa05e1232ae18cd8b29662fa /drivers
parent3342a68922e7ba933a7b7bdf801d798daf5454b3 (diff)
UBUNTU: SAUCE: isapnp_init: make isa PNP scans occur async
The results of scanning for devices is to trigger udev events therefore we can push this processing async. This reduces kernel initialisation time (the time from bootloader to starting userspace) by several 10ths of a second x86 32bit systems. Signed-off-by: Andy Whitcroft <apw@canonical.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pnp/isapnp/core.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
index 918d5f04486..972fde66233 100644
--- a/drivers/pnp/isapnp/core.c
+++ b/drivers/pnp/isapnp/core.c
@@ -41,6 +41,7 @@
#include <linux/init.h>
#include <linux/isapnp.h>
#include <linux/mutex.h>
+#include <linux/async.h>
#include <asm/io.h>
#include "../base.h"
@@ -1001,7 +1002,7 @@ struct pnp_protocol isapnp_protocol = {
.disable = isapnp_disable_resources,
};
-static int __init isapnp_init(void)
+static int __init real_isapnp_init(void)
{
int cards;
struct pnp_card *card;
@@ -1095,6 +1096,15 @@ static int __init isapnp_init(void)
return 0;
}
+static void __init async_isapnp_init(void *unused, async_cookie_t cookie)
+{
+ (void)real_isapnp_init();
+}
+
+static int __init isapnp_init(void)
+{
+ async_schedule(async_isapnp_init, NULL);
+}
device_initcall(isapnp_init);
/* format is: noisapnp */