summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Pais <allen.lkml@gmail.com>2017-09-21 22:34:54 +0530
committerDavid S. Miller <davem@davemloft.net>2017-09-21 11:44:41 -0700
commitcec55a92a98fb3205cc4f127d9b70b5a965f3bd7 (patch)
tree8387ceb3d8aed218da83b0f9d0a003e81bbada09
parentaf25c31d4bf4bc7d4dea4c093af8b7704ef24f81 (diff)
downloadlinux-cec55a92a98fb3205cc4f127d9b70b5a965f3bd7.tar.gz
linux-cec55a92a98fb3205cc4f127d9b70b5a965f3bd7.tar.bz2
linux-cec55a92a98fb3205cc4f127d9b70b5a965f3bd7.zip
drivers: net: amd8111e: use setup_timer() helper.
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais <allen.lkml@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/amd/amd8111e.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/amd/amd8111e.c b/drivers/net/ethernet/amd/amd8111e.c
index 7b5df562f30f..7f22af6e37e0 100644
--- a/drivers/net/ethernet/amd/amd8111e.c
+++ b/drivers/net/ethernet/amd/amd8111e.c
@@ -1883,9 +1883,8 @@ static int amd8111e_probe_one(struct pci_dev *pdev,
/* Initialize software ipg timer */
if(lp->options & OPTION_DYN_IPG_ENABLE){
- init_timer(&lp->ipg_data.ipg_timer);
- lp->ipg_data.ipg_timer.data = (unsigned long) dev;
- lp->ipg_data.ipg_timer.function = (void *)&amd8111e_config_ipg;
+ setup_timer(&lp->ipg_data.ipg_timer,
+ (void *)&amd8111e_config_ipg, (unsigned long)dev);
lp->ipg_data.ipg_timer.expires = jiffies +
IPG_CONVERGE_JIFFIES;
lp->ipg_data.ipg = DEFAULT_IPG;