aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-25 06:51:03 -0400
committerDavid S. Miller <davem@davemloft.net>2017-10-26 23:09:15 -0400
commit0ff624fbfefbb96db62d100bda84e4fbdabaf628 (patch)
tree213c337c7a16bfe7adb767677c8cf416aa8eb35c
parenta78ec0d4f0eada03378413d51c92d0c1253133fa (diff)
drivers/net: 3com/3c515: 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: Thomas Gleixner <tglx@linutronix.de> Cc: Stephen Hemminger <stephen@networkplumber.org> Cc: Johannes Berg <johannes.berg@intel.com> 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/ethernet/3com/3c515.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/3com/3c515.c b/drivers/net/ethernet/3com/3c515.c
index c5987f518cb2..b648e3f95c01 100644
--- a/drivers/net/ethernet/3com/3c515.c
+++ b/drivers/net/ethernet/3com/3c515.c
@@ -367,7 +367,7 @@ static struct net_device *corkscrew_scan(int unit);
367static int corkscrew_setup(struct net_device *dev, int ioaddr, 367static int corkscrew_setup(struct net_device *dev, int ioaddr,
368 struct pnp_dev *idev, int card_number); 368 struct pnp_dev *idev, int card_number);
369static int corkscrew_open(struct net_device *dev); 369static int corkscrew_open(struct net_device *dev);
370static void corkscrew_timer(unsigned long arg); 370static void corkscrew_timer(struct timer_list *t);
371static netdev_tx_t corkscrew_start_xmit(struct sk_buff *skb, 371static netdev_tx_t corkscrew_start_xmit(struct sk_buff *skb,
372 struct net_device *dev); 372 struct net_device *dev);
373static int corkscrew_rx(struct net_device *dev); 373static int corkscrew_rx(struct net_device *dev);
@@ -627,7 +627,7 @@ static int corkscrew_setup(struct net_device *dev, int ioaddr,
627 627
628 spin_lock_init(&vp->lock); 628 spin_lock_init(&vp->lock);
629 629
630 setup_timer(&vp->timer, corkscrew_timer, (unsigned long) dev); 630 timer_setup(&vp->timer, corkscrew_timer, 0);
631 631
632 /* Read the station address from the EEPROM. */ 632 /* Read the station address from the EEPROM. */
633 EL3WINDOW(0); 633 EL3WINDOW(0);
@@ -869,11 +869,11 @@ static int corkscrew_open(struct net_device *dev)
869 return 0; 869 return 0;
870} 870}
871 871
872static void corkscrew_timer(unsigned long data) 872static void corkscrew_timer(struct timer_list *t)
873{ 873{
874#ifdef AUTOMEDIA 874#ifdef AUTOMEDIA
875 struct net_device *dev = (struct net_device *) data; 875 struct corkscrew_private *vp = from_timer(vp, t, timer);
876 struct corkscrew_private *vp = netdev_priv(dev); 876 struct net_device *dev = vp->our_dev;
877 int ioaddr = dev->base_addr; 877 int ioaddr = dev->base_addr;
878 unsigned long flags; 878 unsigned long flags;
879 int ok = 0; 879 int ok = 0;