Commit 2ed343f9 authored by Allen Pais's avatar Allen Pais Committed by David S. Miller

net:nfc: use setup_timer

Use setup_timer function instead of initializing timer with the
    function and data fields.
Signed-off-by: default avatarAllen Pais <allen.lkml@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8701352b
...@@ -1094,9 +1094,8 @@ struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops, ...@@ -1094,9 +1094,8 @@ struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops,
dev->targets_generation = 1; dev->targets_generation = 1;
if (ops->check_presence) { if (ops->check_presence) {
init_timer(&dev->check_pres_timer); setup_timer(&dev->check_pres_timer, nfc_check_pres_timeout,
dev->check_pres_timer.data = (unsigned long)dev; (unsigned long)dev);
dev->check_pres_timer.function = nfc_check_pres_timeout;
INIT_WORK(&dev->check_pres_work, nfc_check_pres_work); INIT_WORK(&dev->check_pres_work, nfc_check_pres_work);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment