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>
This commit is contained in:
Allen Pais 2017-09-21 22:35:18 +05:30 committed by David S. Miller
parent 9d90725f33
commit 997decfb6a

View File

@ -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);
} }