# \[PATCH 24/64\] drivers: net: enic: use setup\_timer() helper.

- From: Allen Pais \<hidden\>
- Date: 2017-09-21 17:08:18 
- List: netdev
- Page: https://ratatoskr.run/netdev/2017/09/5092738
- Thread: https://ratatoskr.run/netdev/2017/09/5092715/t.md

```text
    Use setup_timer function instead of initializing timer with the
    function and data fields.

Signed-off-by: Allen Pais <redacted>
---
 drivers/net/ethernet/cisco/enic/enic_main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
index d24ee1a..4a11baf 100644
--- a/drivers/net/ethernet/cisco/enic/enic_main.c
+++ b/drivers/net/ethernet/cisco/enic/enic_main.c
@@ -2846,9 +2846,8 @@ static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	/* Setup notification timer, HW reset task, and wq locks
 	 */
 
-	init_timer(&enic->notify_timer);
-	enic->notify_timer.function = enic_notify_timer;
-	enic->notify_timer.data = (unsigned long)enic;
+	setup_timer(&enic->notify_timer, enic_notify_timer,
+		    (unsigned long)enic);
 
 	enic_set_rx_coal_setting(enic);
 	INIT_WORK(&enic->reset, enic_reset);
-- 
2.7.4
```
