fix build for kernel 6.15

This commit is contained in:
Dominik Wójt
2025-04-29 21:06:31 +02:00
parent 73f5c4359a
commit 5630429ac2
4 changed files with 364 additions and 357 deletions

View File

@@ -389,7 +389,11 @@ __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
}
static inline void _init_workitem(_workitem *pwork, void *pfunc, void *cntx)