summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/3com/3c589_cs.c
diff options
context:
space:
mode:
authorVaishali Thakkar <vthakkar1994@gmail.com>2015-02-11 13:29:50 +0300
committerDavid S. Miller <davem@davemloft.net>2015-02-12 06:40:12 +0300
commit1d6c4cca41840c82e6967a48137f622547244630 (patch)
treed7c77722a04765ff73d7087e9de259bc7384cbea /drivers/net/ethernet/3com/3c589_cs.c
parent163cff31de762a4e21df7050e392bf5f30f17e14 (diff)
downloadlinux-1d6c4cca41840c82e6967a48137f622547244630.tar.xz
drivers/net: Use setup_timer and mod_timer
This patch introduces the use of functions setup_timer and mod_timer. This is done using Coccinelle and semantic patch used for this as follows: // <smpl> @@ expression x,y,z,a,b; @@ -init_timer (&x); +setup_timer (&x, y, z); +mod_timer (&a, b); -x.function = y; -x.data = z; -x.expires = b; -add_timer(&a); // </smpl> Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/3com/3c589_cs.c')
-rw-r--r--drivers/net/ethernet/3com/3c589_cs.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/3com/3c589_cs.c b/drivers/net/ethernet/3com/3c589_cs.c
index f18647c23559..c5a320507556 100644
--- a/drivers/net/ethernet/3com/3c589_cs.c
+++ b/drivers/net/ethernet/3com/3c589_cs.c
@@ -518,11 +518,8 @@ static int el3_open(struct net_device *dev)
netif_start_queue(dev);
tc589_reset(dev);
- init_timer(&lp->media);
- lp->media.function = media_check;
- lp->media.data = (unsigned long) dev;
- lp->media.expires = jiffies + HZ;
- add_timer(&lp->media);
+ setup_timer(&lp->media, media_check, (unsigned long)dev);
+ mod_timer(&lp->media, jiffies + HZ);
dev_dbg(&link->dev, "%s: opened, status %4.4x.\n",
dev->name, inw(dev->base_addr + EL3_STATUS));