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

drivers/net: arcnet: 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: Michael Grzeschik <m.grzeschik@pengutronix.de>
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 032cfd66
...@@ -382,9 +382,10 @@ static void arcdev_setup(struct net_device *dev) ...@@ -382,9 +382,10 @@ static void arcdev_setup(struct net_device *dev)
dev->flags = IFF_BROADCAST; dev->flags = IFF_BROADCAST;
} }
static void arcnet_timer(unsigned long data) static void arcnet_timer(struct timer_list *t)
{ {
struct net_device *dev = (struct net_device *)data; struct arcnet_local *lp = from_timer(lp, t, timer);
struct net_device *dev = lp->dev;
if (!netif_carrier_ok(dev)) { if (!netif_carrier_ok(dev)) {
netif_carrier_on(dev); netif_carrier_on(dev);
...@@ -450,7 +451,7 @@ struct net_device *alloc_arcdev(const char *name) ...@@ -450,7 +451,7 @@ struct net_device *alloc_arcdev(const char *name)
lp->dev = dev; lp->dev = dev;
spin_lock_init(&lp->lock); spin_lock_init(&lp->lock);
setup_timer(&lp->timer, arcnet_timer, (unsigned long)dev); timer_setup(&lp->timer, arcnet_timer, 0);
} }
return dev; return dev;
......
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