Skip to content

Commit

Permalink
qlge: Replacing add_timer() to mod_timer()
Browse files Browse the repository at this point in the history
Currently qlge driver calls add_timer() instead of mod_timer().
This patch changes add_timer() to mod_timer(), which seems a better
solution.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Breno Leitao authored and David S. Miller committed Jul 3, 2010
1 parent 0dacca7 commit 72046d8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/net/qlge/qlge_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4611,8 +4611,7 @@ static void ql_timer(unsigned long data)
return;
}

qdev->timer.expires = jiffies + (5*HZ);
add_timer(&qdev->timer);
mod_timer(&qdev->timer, jiffies + (5*HZ));
}

static int __devinit qlge_probe(struct pci_dev *pdev,
Expand Down Expand Up @@ -4808,8 +4807,7 @@ static void qlge_io_resume(struct pci_dev *pdev)
netif_err(qdev, ifup, qdev->ndev,
"Device was not running prior to EEH.\n");
}
qdev->timer.expires = jiffies + (5*HZ);
add_timer(&qdev->timer);
mod_timer(&qdev->timer, jiffies + (5*HZ));
netif_device_attach(ndev);
}

Expand Down Expand Up @@ -4871,8 +4869,7 @@ static int qlge_resume(struct pci_dev *pdev)
return err;
}

qdev->timer.expires = jiffies + (5*HZ);
add_timer(&qdev->timer);
mod_timer(&qdev->timer, jiffies + (5*HZ));
netif_device_attach(ndev);

return 0;
Expand Down

0 comments on commit 72046d8

Please sign in to comment.