summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ti/cpsw_ale.c
diff options
context:
space:
mode:
authorAllen Pais <allen.lkml@gmail.com>2017-09-21 22:35:17 +0530
committerDavid S. Miller <davem@davemloft.net>2017-09-21 11:44:44 -0700
commit9d90725f33ebd0f30790c26eb5e9e0a098567895 (patch)
treef947351c6611f3344942091e05980412b6a03c3a /drivers/net/ethernet/ti/cpsw_ale.c
parent7e47fc264e2837d971720ccf1f8b35648c2626ea (diff)
downloadlinux-9d90725f33ebd0f30790c26eb5e9e0a098567895.tar.bz2
drivers: net: cpsw_ale: 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>
Diffstat (limited to 'drivers/net/ethernet/ti/cpsw_ale.c')
-rw-r--r--drivers/net/ethernet/ti/cpsw_ale.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c
index ddd43e09111e..cd1185e66133 100644
--- a/drivers/net/ethernet/ti/cpsw_ale.c
+++ b/drivers/net/ethernet/ti/cpsw_ale.c
@@ -859,9 +859,7 @@ void cpsw_ale_start(struct cpsw_ale *ale)
cpsw_ale_control_set(ale, 0, ALE_ENABLE, 1);
cpsw_ale_control_set(ale, 0, ALE_CLEAR, 1);
- init_timer(&ale->timer);
- ale->timer.data = (unsigned long)ale;
- ale->timer.function = cpsw_ale_timer;
+ setup_timer(&ale->timer, cpsw_ale_timer, (unsigned long)ale);
if (ale->ageout) {
ale->timer.expires = jiffies + ale->ageout;
add_timer(&ale->timer);