summaryrefslogtreecommitdiff
path: root/drivers/net/arcnet/arcnet.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/arcnet/arcnet.c')
-rw-r--r--drivers/net/arcnet/arcnet.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c
index fcfccbb3d9a2..8459115d9d4e 100644
--- a/drivers/net/arcnet/arcnet.c
+++ b/drivers/net/arcnet/arcnet.c
@@ -382,9 +382,10 @@ static void arcdev_setup(struct net_device *dev)
dev->flags = IFF_BROADCAST;
}
-static void arcnet_timer(unsigned long data)
+static void arcnet_timer(struct timer_list *t)
{
- struct net_device *dev = (struct net_device *)data;
+ struct arcnet_local *lp = from_timer(lp, t, timer);
+ struct net_device *dev = lp->dev;
if (!netif_carrier_ok(dev)) {
netif_carrier_on(dev);
@@ -450,9 +451,7 @@ struct net_device *alloc_arcdev(const char *name)
lp->dev = dev;
spin_lock_init(&lp->lock);
- init_timer(&lp->timer);
- lp->timer.data = (unsigned long) dev;
- lp->timer.function = arcnet_timer;
+ timer_setup(&lp->timer, arcnet_timer, 0);
}
return dev;