tty: n_gsm, use setup_timer
authorJiri Slaby <jslaby@suse.cz>
Wed, 30 Jul 2014 13:03:57 +0000 (15:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Aug 2014 23:04:21 +0000 (16:04 -0700)
Just a simple cleanup of init_timer with setting the fields manually.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_gsm.c

index 81e7ccbd9e4af571cc1f87a0a070d018b2dc631a..d5f578fe3fa655f38d8fc70dbd51e5b7388cd240 100644 (file)
@@ -2088,9 +2088,7 @@ static int gsm_activate_mux(struct gsm_mux *gsm)
        struct gsm_dlci *dlci;
        int i = 0;
 
-       init_timer(&gsm->t2_timer);
-       gsm->t2_timer.function = gsm_control_retransmit;
-       gsm->t2_timer.data = (unsigned long)gsm;
+       setup_timer(&gsm->t2_timer, gsm_control_retransmit, (unsigned long)gsm);
        init_waitqueue_head(&gsm->event);
        spin_lock_init(&gsm->control_lock);
        spin_lock_init(&gsm->tx_lock);