Commit 0eba23bb authored by Kees Cook's avatar Kees Cook Committed by David S. Miller

drivers/net: hippi: Convert timers to use timer_setup()

In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.

Cc: Jes Sorensen <jes@trained-monkey.org>
Cc: linux-hippi@sunsite.dk
Cc: netdev@vger.kernel.org
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f6fd8918
...@@ -1146,10 +1146,10 @@ static inline void rr_raz_rx(struct rr_private *rrpriv, ...@@ -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 = from_timer(rrpriv, t, timer);
struct rr_private *rrpriv = netdev_priv(dev); struct net_device *dev = pci_get_drvdata(rrpriv->pci_dev);
struct rr_regs __iomem *regs = rrpriv->regs; struct rr_regs __iomem *regs = rrpriv->regs;
unsigned long flags; unsigned long flags;
...@@ -1229,7 +1229,7 @@ static int rr_open(struct net_device *dev) ...@@ -1229,7 +1229,7 @@ static int rr_open(struct net_device *dev)
/* Set the timer to switch to check for link beat and perhaps switch /* Set the timer to switch to check for link beat and perhaps switch
to an alternate media type. */ to an alternate media type. */
setup_timer(&rrpriv->timer, rr_timer, (unsigned long)dev); timer_setup(&rrpriv->timer, rr_timer, 0);
rrpriv->timer.expires = RUN_AT(5*HZ); /* 5 sec. watchdog */ rrpriv->timer.expires = RUN_AT(5*HZ); /* 5 sec. watchdog */
add_timer(&rrpriv->timer); add_timer(&rrpriv->timer);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment