net:nfc: use setup_timer
Subsystems (3)
PATCH 1/1 net:nfc: use setup_timer
Use setup_timer function instead of initializing timer with the function and data fields.
Signed-off-by Allen Pais <[email protected]>
--- net/nfc/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
net/nfc/core.c +2 -3
@@ -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); }
Signature · 1 line
2.7.4
From: Allen Pais <[email protected]>
Date: Thu, 21 Sep 2017 16:29:33 +0530
Quoted 4 lines
Use
setup_timerfunction instead of initializing timer with the function and data fields.Signed-off-by Allen Pais <[email protected]>
Applied.