diff options
author | Allen Pais <allen.lkml@gmail.com> | 2017-09-25 03:30:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-25 16:19:20 -0400 |
commit | 22d387e13ac357279ddac55694883fd3e30a5639 (patch) | |
tree | 8bbec7b4df7a36258d40c0e296b34322611a68d5 /net/nfc | |
parent | b1e07c5486f0df26caf93234bd7db5545a37aba8 (diff) |
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>
Diffstat (limited to 'net/nfc')
-rw-r--r-- | net/nfc/hci/llc_shdlc.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/net/nfc/hci/llc_shdlc.c b/net/nfc/hci/llc_shdlc.c index 17e59a009ce6..58df37eae1e8 100644 --- a/net/nfc/hci/llc_shdlc.c +++ b/net/nfc/hci/llc_shdlc.c | |||
@@ -763,17 +763,14 @@ static void *llc_shdlc_init(struct nfc_hci_dev *hdev, xmit_to_drv_t xmit_to_drv, | |||
763 | mutex_init(&shdlc->state_mutex); | 763 | mutex_init(&shdlc->state_mutex); |
764 | shdlc->state = SHDLC_DISCONNECTED; | 764 | shdlc->state = SHDLC_DISCONNECTED; |
765 | 765 | ||
766 | init_timer(&shdlc->connect_timer); | 766 | setup_timer(&shdlc->connect_timer, llc_shdlc_connect_timeout, |
767 | shdlc->connect_timer.data = (unsigned long)shdlc; | 767 | (unsigned long)shdlc); |
768 | shdlc->connect_timer.function = llc_shdlc_connect_timeout; | ||
769 | 768 | ||
770 | init_timer(&shdlc->t1_timer); | 769 | setup_timer(&shdlc->t1_timer, llc_shdlc_t1_timeout, |
771 | shdlc->t1_timer.data = (unsigned long)shdlc; | 770 | (unsigned long)shdlc); |
772 | shdlc->t1_timer.function = llc_shdlc_t1_timeout; | ||
773 | 771 | ||
774 | init_timer(&shdlc->t2_timer); | 772 | setup_timer(&shdlc->t2_timer, llc_shdlc_t2_timeout, |
775 | shdlc->t2_timer.data = (unsigned long)shdlc; | 773 | (unsigned long)shdlc); |
776 | shdlc->t2_timer.function = llc_shdlc_t2_timeout; | ||
777 | 774 | ||
778 | shdlc->w = SHDLC_MAX_WINDOW; | 775 | shdlc->w = SHDLC_MAX_WINDOW; |
779 | shdlc->srej_support = SHDLC_SREJ_SUPPORT; | 776 | shdlc->srej_support = SHDLC_SREJ_SUPPORT; |