summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8712/osdep_service.h
diff options
context:
space:
mode:
authorVaishali Thakkar2015-02-27 18:55:48 +0100
committerGreg Kroah-Hartman2015-03-02 02:02:11 +0100
commitc703c750cc247c5b06aef5cc054e62543c79e6b5 (patch)
treeed8f19521f770215159eb9424c9da823e43e471b /drivers/staging/rtl8712/osdep_service.h
parentstaging: gdm72xx: Condense two statements into one to improve code readability. (diff)
downloadkernel-qcow2-linux-c703c750cc247c5b06aef5cc054e62543c79e6b5.tar.gz
kernel-qcow2-linux-c703c750cc247c5b06aef5cc054e62543c79e6b5.tar.xz
kernel-qcow2-linux-c703c750cc247c5b06aef5cc054e62543c79e6b5.zip
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/osdep_service.h')
-rw-r--r--drivers/staging/rtl8712/osdep_service.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/staging/rtl8712/osdep_service.h b/drivers/staging/rtl8712/osdep_service.h
index 36348d900d34..54c4c470cd8e 100644
--- a/drivers/staging/rtl8712/osdep_service.h
+++ b/drivers/staging/rtl8712/osdep_service.h
@@ -69,11 +69,6 @@ static inline void _init_timer(struct timer_list *ptimer,
init_timer(ptimer);
}
-static inline void _set_timer(struct timer_list *ptimer, u32 delay_time)
-{
- mod_timer(ptimer, (jiffies+msecs_to_jiffies(delay_time)));
-}
-
static inline void _cancel_timer(struct timer_list *ptimer, u8 *bcancelled)
{
del_timer(ptimer);