drivers: net: enic: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Thu, 21 Sep 2017 17:04:45 +0000 (22:34 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Sep 2017 18:44:41 +0000 (11:44 -0700)
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>
drivers/net/ethernet/cisco/enic/enic_main.c

index d24ee1ad3be1dadb36022b721a81effeb7cf6bb4..4a11baffe02d931fc54a9b9a0bc8d56e20dd800a 100644 (file)
@@ -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);