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>
This commit is contained in:
parent
163cff31de
commit
1d6c4cca41
@ -518,11 +518,8 @@ static int el3_open(struct net_device *dev)
|
|||||||
netif_start_queue(dev);
|
netif_start_queue(dev);
|
||||||
|
|
||||||
tc589_reset(dev);
|
tc589_reset(dev);
|
||||||
init_timer(&lp->media);
|
setup_timer(&lp->media, media_check, (unsigned long)dev);
|
||||||
lp->media.function = media_check;
|
mod_timer(&lp->media, jiffies + HZ);
|
||||||
lp->media.data = (unsigned long) dev;
|
|
||||||
lp->media.expires = jiffies + HZ;
|
|
||||||
add_timer(&lp->media);
|
|
||||||
|
|
||||||
dev_dbg(&link->dev, "%s: opened, status %4.4x.\n",
|
dev_dbg(&link->dev, "%s: opened, status %4.4x.\n",
|
||||||
dev->name, inw(dev->base_addr + EL3_STATUS));
|
dev->name, inw(dev->base_addr + EL3_STATUS));
|
||||||
|
Loading…
Reference in New Issue
Block a user