]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
drivers: net: cpsw_ale: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Thu, 21 Sep 2017 17:05:17 +0000 (22:35 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Sep 2017 18:44:44 +0000 (11:44 -0700)
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>
drivers/net/ethernet/ti/cpsw_ale.c

index ddd43e09111e2510558a84a2725946d563e162b1..cd1185e6613387e60b74bdd0a75f8f21b230dcf8 100644 (file)
@@ -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);