diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-25 06:51:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-26 23:09:15 -0400 |
commit | 0eba23bbcece8f0fe925f302facbae27f086b887 (patch) | |
tree | e2255a22bea4085859f85ac54f204fff2048fe5d | |
parent | f6fd8918f04191a3e24a0717e97520b65a7d6c4e (diff) |
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>
-rw-r--r-- | drivers/net/hippi/rrunner.c | 8 |
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, | |||
1146 | } | 1146 | } |
1147 | } | 1147 | } |
1148 | 1148 | ||
1149 | static void rr_timer(unsigned long data) | 1149 | static void rr_timer(struct timer_list *t) |
1150 | { | 1150 | { |
1151 | struct net_device *dev = (struct net_device *)data; | 1151 | struct rr_private *rrpriv = from_timer(rrpriv, t, timer); |
1152 | struct rr_private *rrpriv = netdev_priv(dev); | 1152 | struct net_device *dev = pci_get_drvdata(rrpriv->pci_dev); |
1153 | struct rr_regs __iomem *regs = rrpriv->regs; | 1153 | struct rr_regs __iomem *regs = rrpriv->regs; |
1154 | unsigned long flags; | 1154 | unsigned long flags; |
1155 | 1155 | ||
@@ -1229,7 +1229,7 @@ static int rr_open(struct net_device *dev) | |||
1229 | 1229 | ||
1230 | /* Set the timer to switch to check for link beat and perhaps switch | 1230 | /* Set the timer to switch to check for link beat and perhaps switch |
1231 | to an alternate media type. */ | 1231 | to an alternate media type. */ |
1232 | setup_timer(&rrpriv->timer, rr_timer, (unsigned long)dev); | 1232 | timer_setup(&rrpriv->timer, rr_timer, 0); |
1233 | rrpriv->timer.expires = RUN_AT(5*HZ); /* 5 sec. watchdog */ | 1233 | rrpriv->timer.expires = RUN_AT(5*HZ); /* 5 sec. watchdog */ |
1234 | add_timer(&rrpriv->timer); | 1234 | add_timer(&rrpriv->timer); |
1235 | 1235 | ||