Skip to content

Commit d835b63

Browse files
Allen Paisdavem330
authored andcommitted
net: nfc: llcp_core: 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 22d387e commit d835b63

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

net/nfc/llcp_core.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1573,9 +1573,8 @@ int nfc_llcp_register_device(struct nfc_dev *ndev)
15731573
INIT_LIST_HEAD(&local->list);
15741574
kref_init(&local->ref);
15751575
mutex_init(&local->sdp_lock);
1576-
init_timer(&local->link_timer);
1577-
local->link_timer.data = (unsigned long) local;
1578-
local->link_timer.function = nfc_llcp_symm_timer;
1576+
setup_timer(&local->link_timer, nfc_llcp_symm_timer,
1577+
(unsigned long)local);
15791578

15801579
skb_queue_head_init(&local->tx_queue);
15811580
INIT_WORK(&local->tx_work, nfc_llcp_tx_work);
@@ -1601,9 +1600,8 @@ int nfc_llcp_register_device(struct nfc_dev *ndev)
16011600

16021601
mutex_init(&local->sdreq_lock);
16031602
INIT_HLIST_HEAD(&local->pending_sdreqs);
1604-
init_timer(&local->sdreq_timer);
1605-
local->sdreq_timer.data = (unsigned long) local;
1606-
local->sdreq_timer.function = nfc_llcp_sdreq_timer;
1603+
setup_timer(&local->sdreq_timer, nfc_llcp_sdreq_timer,
1604+
(unsigned long)local);
16071605
INIT_WORK(&local->sdreq_timeout_work, nfc_llcp_sdreq_timeout_work);
16081606

16091607
list_add(&local->list, &llcp_devices);

0 commit comments

Comments
 (0)