diff options
author | Allen Pais <allen.lkml@gmail.com> | 2017-09-21 06:59:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-21 18:47:57 -0400 |
commit | 2ed343f98178ff232b504bbd006b34db07835082 (patch) | |
tree | 901e93d27399b74ac2d69e45666869c763c72140 /net/nfc | |
parent | 8701352b22a2f82c814283131587e970a56b69a8 (diff) |
net:nfc: use setup_timer
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')
-rw-r--r-- | net/nfc/core.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/nfc/core.c b/net/nfc/core.c index 5cf33df888c3..e5e23c2cbe74 100644 --- a/net/nfc/core.c +++ b/net/nfc/core.c | |||
@@ -1094,9 +1094,8 @@ struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops, | |||
1094 | dev->targets_generation = 1; | 1094 | dev->targets_generation = 1; |
1095 | 1095 | ||
1096 | if (ops->check_presence) { | 1096 | if (ops->check_presence) { |
1097 | init_timer(&dev->check_pres_timer); | 1097 | setup_timer(&dev->check_pres_timer, nfc_check_pres_timeout, |
1098 | dev->check_pres_timer.data = (unsigned long)dev; | 1098 | (unsigned long)dev); |
1099 | dev->check_pres_timer.function = nfc_check_pres_timeout; | ||
1100 | 1099 | ||
1101 | INIT_WORK(&dev->check_pres_work, nfc_check_pres_work); | 1100 | INIT_WORK(&dev->check_pres_work, nfc_check_pres_work); |
1102 | } | 1101 | } |