Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1736535 > unrolled thread
| Started by | Allen Pais <allen.lkml@gmail.com> |
|---|---|
| First post | 2017-09-21 13:00 +0200 |
| Last post | 2017-09-22 00:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 1/1] net:nfc: use setup_timer Allen Pais <allen.lkml@gmail.com> - 2017-09-21 13:00 +0200
Re: [PATCH 1/1] net:nfc: use setup_timer David Miller <davem@davemloft.net> - 2017-09-22 00:50 +0200
| From | Allen Pais <allen.lkml@gmail.com> |
|---|---|
| Date | 2017-09-21 13:00 +0200 |
| Subject | [PATCH 1/1] net:nfc: use setup_timer |
| Message-ID | <us7n3-8lo-1@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2017-09-22 00:50 +0200 |
| Message-ID | <usis9-6Mo-15@gated-at.bofh.it> |
| In reply to | #1736535 |
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.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web