lkml.org 
[lkml]   [2017]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 11/64] drivers: net: rsi_91x: use setup_timer() helper.
Date
    Use setup_timer function instead of initializing timer with the
function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
drivers/net/wireless/rsi/rsi_91x_hal.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/rsi/rsi_91x_hal.c b/drivers/net/wireless/rsi/rsi_91x_hal.c
index 070dfd6..7ad286d 100644
--- a/drivers/net/wireless/rsi/rsi_91x_hal.c
+++ b/drivers/net/wireless/rsi/rsi_91x_hal.c
@@ -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;
--
2.7.4
\
 
 \ /
  Last update: 2017-09-21 19:39    [W:0.271 / U:3.108 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site