From 1eeae4b0c6045ccd9be9aa3ed20274b0b0180835 Mon Sep 17 00:00:00 2001 From: Olof Johansson Date: Mon, 2 Jul 2012 19:51:09 -0700 Subject: [PATCH] CHROMIUM: input: cyapa: switch to async_schedule for detect and start This speeds up boot since it's one of the long init functions. BUG=chrome-os-partner:11403 TEST=boot Change-Id: I7d005f95656510164b2368196b6b94884e77fc56 Signed-off-by: Olof Johansson Reviewed-on: https://gerrit.chromium.org/gerrit/28916 Reviewed-by: Doug Anderson Reviewed-by: Benson Leung --- drivers/input/mouse/cyapa.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/input/mouse/cyapa.c b/drivers/input/mouse/cyapa.c index 07ffb3a4096a..578974c2b884 100644 --- a/drivers/input/mouse/cyapa.c +++ b/drivers/input/mouse/cyapa.c @@ -12,6 +12,7 @@ */ +#include #include #include #include @@ -1802,6 +1803,15 @@ static void cyapa_start_runtime(struct cyapa *cyapa) static void cyapa_start_runtime(struct cyapa *cyapa) {} #endif /* CONFIG_PM_RUNTIME */ +static void cyapa_detect_and_start(void *data, async_cookie_t cookie) +{ + struct cyapa *cyapa = data; + + cyapa_detect(cyapa); + + cyapa_start_runtime(cyapa); +} + static int __devinit cyapa_probe(struct i2c_client *client, const struct i2c_device_id *dev_id) { @@ -1870,9 +1880,7 @@ static int __devinit cyapa_probe(struct i2c_client *client, dev_warn(dev, "error creating wakeup power entries.\n"); #endif /* CONFIG_PM_SLEEP */ - cyapa_detect(cyapa); - - cyapa_start_runtime(cyapa); + async_schedule(cyapa_detect_and_start, cyapa); return 0; err_mem_free: -- 2.20.1