drivers: net: rsi_91x: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Thu, 21 Sep 2017 17:04:32 +0000 (22:34 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Sep 2017 18:44:39 +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/wireless/rsi/rsi_91x_hal.c

index 070dfd68bb836281890e70a18ca9bed8f9cd7770..7ad286d6e9a7fb67bc0123d1536402d1e3aefee4 100644 (file)
@@ -411,9 +411,8 @@ static void bl_cmd_timeout(unsigned long priv)
 
 static int bl_start_cmd_timer(struct rsi_hw *adapter, u32 timeout)
 {
-       init_timer(&adapter->bl_cmd_timer);
-       adapter->bl_cmd_timer.data = (unsigned long)adapter;
-       adapter->bl_cmd_timer.function = (void *)&bl_cmd_timeout;
+       setup_timer(&adapter->bl_cmd_timer, (void *)&bl_cmd_timeout,
+                   (unsigned long)adapter);
        adapter->bl_cmd_timer.expires = (msecs_to_jiffies(timeout) + jiffies);
 
        adapter->blcmd_timer_expired = false;