diff options
author | Allen Pais <allen.lkml@gmail.com> | 2017-09-21 20:04:57 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-21 21:44:42 +0300 |
commit | 9f5ca8816b5ccc1fd13baf46e012fb5228e57763 (patch) | |
tree | ce878e59d2518da1765650fd34e0c80dc221b6c0 /drivers | |
parent | 82f5d72da8755cf73387a007ad323a86ea0b5663 (diff) | |
download | linux-9f5ca8816b5ccc1fd13baf46e012fb5228e57763.tar.xz |
drivers: net: can: 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')
-rw-r--r-- | drivers/net/can/grcan.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/can/grcan.c b/drivers/net/can/grcan.c index a7be12d9a139..8570cfdaea75 100644 --- a/drivers/net/can/grcan.c +++ b/drivers/net/can/grcan.c @@ -1626,13 +1626,11 @@ static int grcan_setup_netdev(struct platform_device *ofdev, spin_lock_init(&priv->lock); if (priv->need_txbug_workaround) { - init_timer(&priv->rr_timer); - priv->rr_timer.function = grcan_running_reset; - priv->rr_timer.data = (unsigned long)dev; + setup_timer(&priv->rr_timer, grcan_running_reset, + (unsigned long)dev); - init_timer(&priv->hang_timer); - priv->hang_timer.function = grcan_initiate_running_reset; - priv->hang_timer.data = (unsigned long)dev; + setup_timer(&priv->hang_timer, grcan_initiate_running_reset, + (unsigned long)dev); } netif_napi_add(dev, &priv->napi, grcan_poll, GRCAN_NAPI_WEIGHT); |