summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllen Pais <allen.lkml@gmail.com>2017-09-21 18:32:58 +0530
committerDavid S. Miller <davem@davemloft.net>2017-09-21 15:48:46 -0700
commit8447779637172809060e5064afdf52f16a09aa13 (patch)
treef0103ecb103d27a82e22e52baaa7c39f0ef5f041
parente53a84b2b47119cbb895a4a83e6675ec50cf9fe5 (diff)
net: ti: netcp: use setup_timer
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>
-rw-r--r--drivers/net/ethernet/ti/netcp_ethss.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/ti/netcp_ethss.c b/drivers/net/ethernet/ti/netcp_ethss.c
index 28cb38af1a34..4ad821655e51 100644
--- a/drivers/net/ethernet/ti/netcp_ethss.c
+++ b/drivers/net/ethernet/ti/netcp_ethss.c
@@ -3616,9 +3616,8 @@ static int gbe_probe(struct netcp_device *netcp_device, struct device *dev,
}
spin_unlock_bh(&gbe_dev->hw_stats_lock);
- init_timer(&gbe_dev->timer);
- gbe_dev->timer.data = (unsigned long)gbe_dev;
- gbe_dev->timer.function = netcp_ethss_timer;
+ setup_timer(&gbe_dev->timer, netcp_ethss_timer,
+ (unsigned long)gbe_dev);
gbe_dev->timer.expires = jiffies + GBE_TIMER_INTERVAL;
add_timer(&gbe_dev->timer);
*inst_priv = gbe_dev;