mirror of
https://github.com/RinCat/RTL88x2BU-Linux-Driver.git
synced 2026-01-29 07:16:35 +00:00
Linux 6.15 compat: rename timers
Signed-off-by: Rin Cat (鈴猫) <rincat@rincat.dev>
This commit is contained in:
@@ -387,12 +387,20 @@ __inline static void _set_timer(_timer *ptimer, u32 delay_time)
|
||||
|
||||
__inline static void _cancel_timer(_timer *ptimer, u8 *bcancelled)
|
||||
{
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0))
|
||||
*bcancelled = timer_delete_sync(&ptimer->timer) == 1 ? 1 : 0;
|
||||
#else
|
||||
*bcancelled = del_timer_sync(&ptimer->timer) == 1 ? 1 : 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
__inline static void _cancel_timer_async(_timer *ptimer)
|
||||
{
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0))
|
||||
timer_delete(&ptimer->timer);
|
||||
#else
|
||||
del_timer(&ptimer->timer);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void _init_workitem(_workitem *pwork, void *pfunc, void *cntx)
|
||||
|
||||
Reference in New Issue
Block a user