diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-26 22:54:38 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-28 19:09:49 +0900 |
commit | c6c52ba1514120db3ad2d36391ed37bafcfc43d7 (patch) | |
tree | 92154e5d57ad96d2e4c7ebc5371623092705565a /drivers/net/ethernet/amd/sunlance.c | |
parent | c63144e4dda7967f2419fa3c2cc5db1228a7fccf (diff) | |
download | linux-c6c52ba1514120db3ad2d36391ed37bafcfc43d7.tar.gz linux-c6c52ba1514120db3ad2d36391ed37bafcfc43d7.tar.bz2 linux-c6c52ba1514120db3ad2d36391ed37bafcfc43d7.zip |
drivers/net: amd: 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: Tom Lendacky <thomas.lendacky@amd.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Allen Pais <allen.lkml@gmail.com>
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/ethernet/amd/sunlance.c')
-rw-r--r-- | drivers/net/ethernet/amd/sunlance.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/amd/sunlance.c b/drivers/net/ethernet/amd/sunlance.c index 0183ffb9d3ba..cdd7a611479b 100644 --- a/drivers/net/ethernet/amd/sunlance.c +++ b/drivers/net/ethernet/amd/sunlance.c @@ -1248,9 +1248,10 @@ static void lance_set_multicast(struct net_device *dev) netif_wake_queue(dev); } -static void lance_set_multicast_retry(unsigned long _opaque) +static void lance_set_multicast_retry(struct timer_list *t) { - struct net_device *dev = (struct net_device *) _opaque; + struct lance_private *lp = from_timer(lp, t, multicast_timer); + struct net_device *dev = lp->dev; lance_set_multicast(dev); } @@ -1459,8 +1460,7 @@ no_link_test: * can occur from interrupts (ex. IPv6). So we * use a timer to try again later when necessary. -DaveM */ - setup_timer(&lp->multicast_timer, lance_set_multicast_retry, - (unsigned long)dev); + timer_setup(&lp->multicast_timer, lance_set_multicast_retry, 0); if (register_netdev(dev)) { printk(KERN_ERR "SunLance: Cannot register device.\n"); |