summaryrefslogtreecommitdiff
path: root/drivers/net/hippi
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-25 13:51:29 +0300
committerDavid S. Miller <davem@davemloft.net>2017-10-27 06:09:15 +0300
commit0eba23bbcece8f0fe925f302facbae27f086b887 (patch)
treee2255a22bea4085859f85ac54f204fff2048fe5d /drivers/net/hippi
parentf6fd8918f04191a3e24a0717e97520b65a7d6c4e (diff)
downloadlinux-0eba23bbcece8f0fe925f302facbae27f086b887.tar.xz
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: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hippi')
-rw-r--r--drivers/net/hippi/rrunner.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/hippi/rrunner.c b/drivers/net/hippi/rrunner.c
index 76cc140774a2..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,7 +1229,7 @@ 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. */
- 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 */
add_timer(&rrpriv->timer);