Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1737273

[PATCH 08/10] drivers: tty: n_gsm: use setup_timer() helper.

From Allen Pais <allen.lkml@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 08/10] drivers: tty: n_gsm: use setup_timer() helper.
Date 2017-09-22 10:30 +0200
Message-ID <usrvt-3Q3-33@gated-at.bofh.it> (permalink)
References <usrvs-3Q3-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


        Use setup_timer function instead of initializing timer with the
        function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
 drivers/tty/n_gsm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 0a3c966..33530d8 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -1646,9 +1646,7 @@ static struct gsm_dlci *gsm_dlci_alloc(struct gsm_mux *gsm, int addr)
 	}
 
 	skb_queue_head_init(&dlci->skb_list);
-	init_timer(&dlci->t1);
-	dlci->t1.function = gsm_dlci_t1;
-	dlci->t1.data = (unsigned long)dlci;
+	setup_timer(&dlci->t1, gsm_dlci_t1, (unsigned long)dlci);
 	tty_port_init(&dlci->port);
 	dlci->port.ops = &gsm_port_ops;
 	dlci->gsm = gsm;
-- 
2.7.4

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 00/10] use setup_timer() helper function. Allen Pais <allen.lkml@gmail.com> - 2017-09-22 10:30 +0200
  [PATCH 01/10] drivers: tty: mux: use setup_timer() helper. Allen Pais <allen.lkml@gmail.com> - 2017-09-22 10:30 +0200
  [PATCH 07/10] drivers: tty: sa1100: use setup_timer() helper. Allen Pais <allen.lkml@gmail.com> - 2017-09-22 10:30 +0200
  [PATCH 09/10] drivers: tty: sn_console: use setup_timer() helper. Allen Pais <allen.lkml@gmail.com> - 2017-09-22 10:30 +0200
  [PATCH 05/10] drivers: tty: pnx8xxx: use setup_timer() helper. Allen Pais <allen.lkml@gmail.com> - 2017-09-22 10:30 +0200
  [PATCH 10/10] drivers: tty: ifx6x60: use setup_timer() helper. Allen Pais <allen.lkml@gmail.com> - 2017-09-22 10:30 +0200
  [PATCH 08/10] drivers: tty: n_gsm: use setup_timer() helper. Allen Pais <allen.lkml@gmail.com> - 2017-09-22 10:30 +0200

csiph-web