summaryrefslogtreecommitdiffstats
path: root/net/nfc/hci
diff options
context:
space:
mode:
authorAllen Pais <allen.lkml@gmail.com>2017-09-25 13:00:03 +0530
committerDavid S. Miller <davem@davemloft.net>2017-09-25 13:19:20 -0700
commitb1e07c5486f0df26caf93234bd7db5545a37aba8 (patch)
treea911be2de7ecc316d4d366c9bed8192849fa9d5e /net/nfc/hci
parent2d04cfcfa2e86cac751979b584e5420dd470903b (diff)
downloadlinux-b1e07c5486f0df26caf93234bd7db5545a37aba8.tar.gz
linux-b1e07c5486f0df26caf93234bd7db5545a37aba8.tar.bz2
linux-b1e07c5486f0df26caf93234bd7db5545a37aba8.zip
net: nfc: hci: 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/hci')
-rw-r--r--net/nfc/hci/core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/nfc/hci/core.c b/net/nfc/hci/core.c
index b740fef0acc5..a8a6e7814e09 100644
--- a/net/nfc/hci/core.c
+++ b/net/nfc/hci/core.c
@@ -1004,9 +1004,8 @@ int nfc_hci_register_device(struct nfc_hci_dev *hdev)
INIT_WORK(&hdev->msg_tx_work, nfc_hci_msg_tx_work);
- init_timer(&hdev->cmd_timer);
- hdev->cmd_timer.data = (unsigned long)hdev;
- hdev->cmd_timer.function = nfc_hci_cmd_timeout;
+ setup_timer(&hdev->cmd_timer, nfc_hci_cmd_timeout,
+ (unsigned long)hdev);
skb_queue_head_init(&hdev->rx_hcp_frags);