Skip to content

Commit

Permalink
drivers: net: enic: use setup_timer() helper.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Allen Pais authored and David S. Miller committed Sep 21, 2017
1 parent 99e3aa1 commit 570ba3e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/ethernet/cisco/enic/enic_clsf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 570ba3e

Please sign in to comment.