Skip to content

Commit

Permalink
net:nfc: use setup_timer
Browse files Browse the repository at this point in the history
Use setup_timer function instead of initializing timer with the
    function and data fields.

Signed-off-by: Allen Pais <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Allen Pais authored and davem330 committed Sep 21, 2017
1 parent 8701352 commit 2ed343f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions net/nfc/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1094,9 +1094,8 @@ struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops,
dev->targets_generation = 1;

if (ops->check_presence) {
init_timer(&dev->check_pres_timer);
dev->check_pres_timer.data = (unsigned long)dev;
dev->check_pres_timer.function = nfc_check_pres_timeout;
setup_timer(&dev->check_pres_timer, nfc_check_pres_timeout,
(unsigned long)dev);

INIT_WORK(&dev->check_pres_work, nfc_check_pres_work);
}
Expand Down

0 comments on commit 2ed343f

Please sign in to comment.