summaryrefslogtreecommitdiffstats
path: root/drivers/net/hippi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/hippi')
-rw-r--r--drivers/net/hippi/rrunner.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/hippi/rrunner.c b/drivers/net/hippi/rrunner.c
index 71ddadbf2368..8483f03d5a41 100644
--- a/drivers/net/hippi/rrunner.c
+++ b/drivers/net/hippi/rrunner.c
@@ -1146,10 +1146,10 @@ static inline void rr_raz_rx(struct rr_private *rrpriv,
}
}
-static void rr_timer(unsigned long data)
+static void rr_timer(struct timer_list *t)
{
- struct net_device *dev = (struct net_device *)data;
- struct rr_private *rrpriv = netdev_priv(dev);
+ struct rr_private *rrpriv = from_timer(rrpriv, t, timer);
+ struct net_device *dev = pci_get_drvdata(rrpriv->pci_dev);
struct rr_regs __iomem *regs = rrpriv->regs;
unsigned long flags;
@@ -1229,10 +1229,8 @@ static int rr_open(struct net_device *dev)
/* Set the timer to switch to check for link beat and perhaps switch
to an alternate media type. */
- init_timer(&rrpriv->timer);
+ timer_setup(&rrpriv->timer, rr_timer, 0);
rrpriv->timer.expires = RUN_AT(5*HZ); /* 5 sec. watchdog */
- rrpriv->timer.data = (unsigned long)dev;
- rrpriv->timer.function = rr_timer; /* timer handler */
add_timer(&rrpriv->timer);
netif_start_queue(dev);