* [PATCH 1/1] net:nfc: use setup_timer
@ 2017-09-21 10:59 Allen Pais
2017-09-21 22:48 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Allen Pais @ 2017-09-21 10:59 UTC (permalink / raw)
To: linux-kernel; +Cc: sameo, netdev, Allen Pais
Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
net/nfc/core.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/nfc/core.c b/net/nfc/core.c
index 5cf33df..e5e23c2 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,
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);
}
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] net:nfc: use setup_timer
2017-09-21 10:59 [PATCH 1/1] net:nfc: use setup_timer Allen Pais
@ 2017-09-21 22:48 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-09-21 22:48 UTC (permalink / raw)
To: allen.lkml; +Cc: linux-kernel, sameo, netdev
From: Allen Pais <allen.lkml@gmail.com>
Date: Thu, 21 Sep 2017 16:29:33 +0530
> Use setup_timer function instead of initializing timer with the
> function and data fields.
>
> Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-21 22:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-21 10:59 [PATCH 1/1] net:nfc: use setup_timer Allen Pais
2017-09-21 22:48 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.