mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-24 00:22:07 +07:00
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:
parent
9d90725f33
commit
997decfb6a
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user