提交 531f3ce9 编写于 作者: A Allen Pais 提交者: David S. Miller

drivers: net: rsi_91x: use setup_timer() helper.

Use setup_timer function instead of initializing timer with the
    function and data fields.
Signed-off-by: NAllen Pais <allen.lkml@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1e153e55
...@@ -411,9 +411,8 @@ static void bl_cmd_timeout(unsigned long priv) ...@@ -411,9 +411,8 @@ static void bl_cmd_timeout(unsigned long priv)
static int bl_start_cmd_timer(struct rsi_hw *adapter, u32 timeout) static int bl_start_cmd_timer(struct rsi_hw *adapter, u32 timeout)
{ {
init_timer(&adapter->bl_cmd_timer); setup_timer(&adapter->bl_cmd_timer, (void *)&bl_cmd_timeout,
adapter->bl_cmd_timer.data = (unsigned long)adapter; (unsigned long)adapter);
adapter->bl_cmd_timer.function = (void *)&bl_cmd_timeout;
adapter->bl_cmd_timer.expires = (msecs_to_jiffies(timeout) + jiffies); adapter->bl_cmd_timer.expires = (msecs_to_jiffies(timeout) + jiffies);
adapter->blcmd_timer_expired = false; adapter->blcmd_timer_expired = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册