Skip to content

Commit b1e07c5

Browse files
Allen Paisdavem330
authored andcommitted
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>
1 parent 2d04cfc commit b1e07c5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

net/nfc/hci/core.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,9 +1004,8 @@ int nfc_hci_register_device(struct nfc_hci_dev *hdev)
10041004

10051005
INIT_WORK(&hdev->msg_tx_work, nfc_hci_msg_tx_work);
10061006

1007-
init_timer(&hdev->cmd_timer);
1008-
hdev->cmd_timer.data = (unsigned long)hdev;
1009-
hdev->cmd_timer.function = nfc_hci_cmd_timeout;
1007+
setup_timer(&hdev->cmd_timer, nfc_hci_cmd_timeout,
1008+
(unsigned long)hdev);
10101009

10111010
skb_queue_head_init(&hdev->rx_hcp_frags);
10121011

0 commit comments

Comments
 (0)