Skip to content

Commit 22d387e

Browse files
Allen Paisdavem330
authored andcommitted
net: nfc: hci: llc_shdlc: use setup_timer() helper.
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais <allen.lkml@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b1e07c5 commit 22d387e

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

net/nfc/hci/llc_shdlc.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -763,17 +763,14 @@ static void *llc_shdlc_init(struct nfc_hci_dev *hdev, xmit_to_drv_t xmit_to_drv,
763763
mutex_init(&shdlc->state_mutex);
764764
shdlc->state = SHDLC_DISCONNECTED;
765765

766-
init_timer(&shdlc->connect_timer);
767-
shdlc->connect_timer.data = (unsigned long)shdlc;
768-
shdlc->connect_timer.function = llc_shdlc_connect_timeout;
766+
setup_timer(&shdlc->connect_timer, llc_shdlc_connect_timeout,
767+
(unsigned long)shdlc);
769768

770-
init_timer(&shdlc->t1_timer);
771-
shdlc->t1_timer.data = (unsigned long)shdlc;
772-
shdlc->t1_timer.function = llc_shdlc_t1_timeout;
769+
setup_timer(&shdlc->t1_timer, llc_shdlc_t1_timeout,
770+
(unsigned long)shdlc);
773771

774-
init_timer(&shdlc->t2_timer);
775-
shdlc->t2_timer.data = (unsigned long)shdlc;
776-
shdlc->t2_timer.function = llc_shdlc_t2_timeout;
772+
setup_timer(&shdlc->t2_timer, llc_shdlc_t2_timeout,
773+
(unsigned long)shdlc);
777774

778775
shdlc->w = SHDLC_MAX_WINDOW;
779776
shdlc->srej_support = SHDLC_SREJ_SUPPORT;

0 commit comments

Comments
 (0)