aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
diff options
context:
space:
mode:
authorAllen Pais <allen.lkml@gmail.com>2017-09-21 22:35:18 +0530
committerDavid S. Miller <davem@davemloft.net>2017-09-21 11:44:44 -0700
commit997decfb6aeaa9be41ff557741845bb9fb4bf5bc (patch)
tree8c361a7e133816753423c49093f69ca2af7a9c5e /drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
parentdrivers: net: cpsw_ale: use setup_timer() helper. (diff)
downloadlinux-dev-997decfb6aeaa9be41ff557741845bb9fb4bf5bc.tar.xz
linux-dev-997decfb6aeaa9be41ff557741845bb9fb4bf5bc.zip
drivers: net: stmmac: use setup_timer() helper.
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>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_main.c')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 1763e48c84e2..f41661a04f23 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2217,10 +2217,8 @@ static void stmmac_init_tx_coalesce(struct stmmac_priv *priv)
{
priv->tx_coal_frames = STMMAC_TX_FRAMES;
priv->tx_coal_timer = STMMAC_COAL_TX_TIMER;
- init_timer(&priv->txtimer);
+ setup_timer(&priv->txtimer, stmmac_tx_timer, (unsigned long)priv);
priv->txtimer.expires = STMMAC_COAL_TIMER(priv->tx_coal_timer);
- priv->txtimer.data = (unsigned long)priv;
- priv->txtimer.function = stmmac_tx_timer;
add_timer(&priv->txtimer);
}