From: Allen Pais <allen.lkml@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, sameo@linux.intel.com,
	Allen Pais <allen.lkml@gmail.com>
Subject: [PATCH 2/5] net: nfc: hci: llc_shdlc: use setup_timer() helper.
Date: Fri, 22 Sep 2017 16:28:19 +0530	[thread overview]
Message-ID: <1506077902-1796-3-git-send-email-allen.lkml@gmail.com> (raw)
In-Reply-To: <1506077902-1796-1-git-send-email-allen.lkml@gmail.com>
   Use setup_timer function instead of initializing timer with the
   function and data fields.
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
 net/nfc/hci/llc_shdlc.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/net/nfc/hci/llc_shdlc.c b/net/nfc/hci/llc_shdlc.c
index 17e59a0..58df37e 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,
 	mutex_init(&shdlc->state_mutex);
 	shdlc->state = SHDLC_DISCONNECTED;
 
-	init_timer(&shdlc->connect_timer);
-	shdlc->connect_timer.data = (unsigned long)shdlc;
-	shdlc->connect_timer.function = llc_shdlc_connect_timeout;
+	setup_timer(&shdlc->connect_timer, llc_shdlc_connect_timeout,
+		    (unsigned long)shdlc);
 
-	init_timer(&shdlc->t1_timer);
-	shdlc->t1_timer.data = (unsigned long)shdlc;
-	shdlc->t1_timer.function = llc_shdlc_t1_timeout;
+	setup_timer(&shdlc->t1_timer, llc_shdlc_t1_timeout,
+		    (unsigned long)shdlc);
 
-	init_timer(&shdlc->t2_timer);
-	shdlc->t2_timer.data = (unsigned long)shdlc;
-	shdlc->t2_timer.function = llc_shdlc_t2_timeout;
+	setup_timer(&shdlc->t2_timer, llc_shdlc_t2_timeout,
+		    (unsigned long)shdlc);
 
 	shdlc->w = SHDLC_MAX_WINDOW;
 	shdlc->srej_support = SHDLC_SREJ_SUPPORT;
-- 
2.7.4
next prev parent reply	other threads:[~2017-09-22 10:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-22 10:58 [PATCH 0/5] use setup_timer() helper function Allen Pais
2017-09-22 10:58 ` [PATCH 1/5] net: nfc: hci: use setup_timer() helper Allen Pais
2017-09-22 10:58 ` Allen Pais [this message]
2017-09-22 10:58 ` [PATCH 3/5] net: af_packet: " Allen Pais
2017-09-22 10:58 ` [PATCH 4/5] net: nfc: core: " Allen Pais
2017-09-22 10:58 ` [PATCH 5/5] net: nfc: llcp_core: " Allen Pais
2017-09-23  1:22 ` [PATCH 0/5] use setup_timer() helper function David Miller
2017-09-25  7:30   ` Allen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox
  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):
  git send-email \
    --in-reply-to=1506077902-1796-3-git-send-email-allen.lkml@gmail.com \
    --to=allen.lkml@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY
  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
  Be sure your reply has a Subject: header at the top and a blank line
  before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).