49e3419d7114f3abfae0c4ba94f7c1dda34050c9
[firefly-linux-kernel-4.4.55.git] / drivers / staging / wilc1000 / wilc_timer.c
1
2 #include "wilc_timer.h"
3
4 WILC_ErrNo WILC_TimerCreate(struct timer_list *pHandle,
5         tpfWILC_TimerFunction pfCallback)
6 {
7         WILC_ErrNo s32RetStatus = WILC_SUCCESS;
8         setup_timer(pHandle, (void(*)(unsigned long))pfCallback, 0);
9
10         return s32RetStatus;
11 }
12
13 WILC_ErrNo WILC_TimerStart(struct timer_list *pHandle, u32 u32Timeout,
14         void *pvArg)
15 {
16         WILC_ErrNo s32RetStatus = WILC_FAIL;
17         if (pHandle != NULL) {
18                 pHandle->data = (unsigned long)pvArg;
19                 s32RetStatus = mod_timer(pHandle, (jiffies + msecs_to_jiffies(u32Timeout)));
20         }
21         return s32RetStatus;
22 }