net: tulip: 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: "David S. Miller" <davem@davemloft.net>
Cc: David Howells <dhowells@redhat.com>
Cc: Jarod Wilson <jarod@redhat.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: Johannes Berg <johannes.berg@intel.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Philippe Reynes <tremyfr@gmail.com>
Cc: "yuval.shaia@oracle.com" <yuval.shaia@oracle.com>
Cc: netdev@vger.kernel.org
Cc: linux-parisc@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Kees Cook
2017-10-16 17:29:05 -07:00
committed by David S. Miller
parent 3d2ceaa63b
commit a8c22a2bbc
10 changed files with 48 additions and 50 deletions

View File

@@ -137,10 +137,10 @@ void tulip_media_task(struct work_struct *work)
}
void mxic_timer(unsigned long data)
void mxic_timer(struct timer_list *t)
{
struct net_device *dev = (struct net_device *)data;
struct tulip_private *tp = netdev_priv(dev);
struct tulip_private *tp = from_timer(tp, t, timer);
struct net_device *dev = tp->dev;
void __iomem *ioaddr = tp->base_addr;
int next_tick = 60*HZ;
@@ -154,10 +154,10 @@ void mxic_timer(unsigned long data)
}
void comet_timer(unsigned long data)
void comet_timer(struct timer_list *t)
{
struct net_device *dev = (struct net_device *)data;
struct tulip_private *tp = netdev_priv(dev);
struct tulip_private *tp = from_timer(tp, t, timer);
struct net_device *dev = tp->dev;
int next_tick = 2*HZ;
if (tulip_debug > 1)