Commit 997decfb authored by Allen Pais's avatar Allen Pais Committed by David S. Miller

drivers: net: stmmac: use setup_timer() helper.

Use setup_timer function instead of initializing timer with the
    function and data fields.
Signed-off-by: default avatarAllen Pais <allen.lkml@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9d90725f
...@@ -2217,10 +2217,8 @@ static void stmmac_init_tx_coalesce(struct stmmac_priv *priv) ...@@ -2217,10 +2217,8 @@ static void stmmac_init_tx_coalesce(struct stmmac_priv *priv)
{ {
priv->tx_coal_frames = STMMAC_TX_FRAMES; priv->tx_coal_frames = STMMAC_TX_FRAMES;
priv->tx_coal_timer = STMMAC_COAL_TX_TIMER; 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.expires = STMMAC_COAL_TIMER(priv->tx_coal_timer);
priv->txtimer.data = (unsigned long)priv;
priv->txtimer.function = stmmac_tx_timer;
add_timer(&priv->txtimer); add_timer(&priv->txtimer);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment