[PATCH] RFKILL: fix input layer initialisation

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Dmitry Baryshkov
Date: Thursday, June 19, 2008 - 4:28 am

Initialise correctly last fields, so tasks can be actually executed

Also move rfkill-input initialisation to subsys level so that it's
available before generic drivers probing occurs.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
---
 net/rfkill/rfkill-input.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/net/rfkill/rfkill-input.c b/net/rfkill/rfkill-input.c
index e4b051d..e4540fc 100644
--- a/net/rfkill/rfkill-input.c
+++ b/net/rfkill/rfkill-input.c
@@ -181,6 +181,11 @@ static struct input_handler rfkill_handler = {
 
 static int __init rfkill_handler_init(void)
 {
+	unsigned long last_run = jiffies - msecs_to_jiffies(500);
+	rfkill_wlan.last = last_run;
+	rfkill_bt.last = last_run;
+	rfkill_uwb.last = last_run;
+	rfkill_wimax.last = last_run;
 	return input_register_handler(&rfkill_handler);
 }
 
@@ -190,5 +195,5 @@ static void __exit rfkill_handler_exit(void)
 	flush_scheduled_work();
 }
 
-module_init(rfkill_handler_init);
+subsys_initcall(rfkill_handler_init);
 module_exit(rfkill_handler_exit);
-- 
1.5.5.3


-- 
With best wishes
Dmitry

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] RFKILL: fix input layer initialisation, Dmitry Baryshkov, (Thu Jun 19, 4:28 am)
Re: [PATCH] RFKILL: fix input layer initialisation, Ivo van Doorn, (Thu Jun 19, 11:49 am)
Re: [PATCH] RFKILL: fix input layer initialisation, Ivo van Doorn, (Fri Jun 20, 12:23 pm)
Re: [PATCH] RFKILL: fix input layer initialisation, Dmitry Torokhov, (Mon Jun 23, 6:22 am)
Re: [PATCH] RFKILL: fix input layer initialisation, Dmitry Baryshkov, (Mon Jun 23, 7:40 am)
Re: [PATCH] RFKILL: fix input layer initialisation, Dmitry Torokhov, (Mon Jun 23, 8:24 am)
Re: [PATCH] RFKILL: fix input layer initialisation, Henrique de Moraes H ..., (Mon Jun 23, 11:21 am)