diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-12-11 21:39:51 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-12-11 23:45:25 -0800 |
commit | e40ec6ff2f42b5516d77a5c34bfa6a9ce45834f4 (patch) | |
tree | 9189d2dbe80c4dec85578551d7e4bc6bdb9b027d /drivers/input/serio | |
parent | 898d1053f72c192a6e7f701e915995afff695de8 (diff) | |
download | kernel_samsung_crespo-e40ec6ff2f42b5516d77a5c34bfa6a9ce45834f4.zip kernel_samsung_crespo-e40ec6ff2f42b5516d77a5c34bfa6a9ce45834f4.tar.gz kernel_samsung_crespo-e40ec6ff2f42b5516d77a5c34bfa6a9ce45834f4.tar.bz2 |
Input: hil-mlc - use del_timer_sync() when unloading the driver
del_timer() does not wait for the timer to finish running before returning
and therefore is technically not safe. Also make sure to enable tasklet
before kicking timer that will schedule it.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/serio')
-rw-r--r-- | drivers/input/serio/hil_mlc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/input/serio/hil_mlc.c b/drivers/input/serio/hil_mlc.c index 7ba9f2b..6cd03eb 100644 --- a/drivers/input/serio/hil_mlc.c +++ b/drivers/input/serio/hil_mlc.c @@ -993,10 +993,8 @@ int hil_mlc_unregister(hil_mlc *mlc) static int __init hil_mlc_init(void) { - init_timer(&hil_mlcs_kicker); - hil_mlcs_kicker.expires = jiffies + HZ; - hil_mlcs_kicker.function = &hil_mlcs_timer; - add_timer(&hil_mlcs_kicker); + setup_timer(&hil_mlcs_kicker, &hil_mlcs_timer, 0); + mod_timer(&hil_mlcs_kicker, jiffies + HZ); tasklet_enable(&hil_mlcs_tasklet); @@ -1005,7 +1003,7 @@ static int __init hil_mlc_init(void) static void __exit hil_mlc_exit(void) { - del_timer(&hil_mlcs_kicker); + del_timer_sync(&hil_mlcs_kicker); tasklet_disable(&hil_mlcs_tasklet); tasklet_kill(&hil_mlcs_tasklet); |