drivers: net: enic: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Thu, 21 Sep 2017 17:05:22 +0000 (22:35 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Sep 2017 18:44:44 +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_clsf.h

index 6aa9f89..4bfbf25 100644 (file)
@@ -19,9 +19,8 @@ void enic_flow_may_expire(unsigned long data);
 
 static inline void enic_rfs_timer_start(struct enic *enic)
 {
-       init_timer(&enic->rfs_h.rfs_may_expire);
-       enic->rfs_h.rfs_may_expire.function = enic_flow_may_expire;
-       enic->rfs_h.rfs_may_expire.data = (unsigned long)enic;
+       setup_timer(&enic->rfs_h.rfs_may_expire, enic_flow_may_expire,
+                   (unsigned long)enic);
        mod_timer(&enic->rfs_h.rfs_may_expire, jiffies + HZ/4);
 }