diff options
author | Vaishali Thakkar <vthakkar1994@gmail.com> | 2015-02-27 23:25:48 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-01 17:02:11 -0800 |
commit | c703c750cc247c5b06aef5cc054e62543c79e6b5 (patch) | |
tree | ed8f19521f770215159eb9424c9da823e43e471b /drivers/staging/rtl8712/rtl8712_recv.c | |
parent | 1862eec4fe45e2d33fb166af3f8e601fc2233d76 (diff) |
Staging: rtl8712: Eliminate use of _set_timer
This patch introduces the use of API function mod_timer
instead of driver specific function _set_timer as it is
a more efficient and standard way to update the expire
field of an active timer. Also, definition of function
_set_timer is removed as it is no longer needed after
this change.
Here, these cases are handled using Coccinelle and
semantic patch used for this is as follows:
@@ expression x; expression y;@@
- _set_timer (&x, y);
+ mod_timer (&x, jiffies + msecs_to_jiffies (y));
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712/rtl8712_recv.c')
-rw-r--r-- | drivers/staging/rtl8712/rtl8712_recv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c index e4fc9e0dedb0..546414d37962 100644 --- a/drivers/staging/rtl8712/rtl8712_recv.c +++ b/drivers/staging/rtl8712/rtl8712_recv.c @@ -604,8 +604,8 @@ static int recv_indicatepkt_reorder(struct _adapter *padapter, */ if (r8712_recv_indicatepkts_in_order(padapter, preorder_ctrl, false) == true) { - _set_timer(&preorder_ctrl->reordering_ctrl_timer, - REORDER_WAIT_TIME); + mod_timer(&preorder_ctrl->reordering_ctrl_timer, + jiffies + msecs_to_jiffies(REORDER_WAIT_TIME)); spin_unlock_irqrestore(&ppending_recvframe_queue->lock, irql); } else { spin_unlock_irqrestore(&ppending_recvframe_queue->lock, irql); |