File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
QDMA/linux-kernel/driver/libqdma Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -308,7 +308,11 @@ static int mbox_rcv_one_msg(struct qdma_mbox *mbox)
308308
309309static inline void mbox_timer_stop (struct qdma_mbox * mbox )
310310{
311+ #if LINUX_VERSION_CODE < KERNEL_VERSION (6 , 16 , 0 )
311312 del_timer (& mbox -> timer );
313+ #else
314+ timer_delete_sync (& mbox -> timer );
315+ #endif
312316}
313317
314318static inline void mbox_timer_start (struct qdma_mbox * mbox )
@@ -432,7 +436,9 @@ static void mbox_timer_handler(struct timer_list *t)
432436static void mbox_timer_handler (unsigned long arg )
433437#endif
434438{
435- #if KERNEL_VERSION (4 , 15 , 0 ) <= LINUX_VERSION_CODE
439+ #if LINUX_VERSION_CODE > KERNEL_VERSION (6 , 16 , 0 )
440+ struct qdma_mbox * mbox = timer_container_of (mbox , t , timer );
441+ #elif KERNEL_VERSION (4 , 15 , 0 ) <= LINUX_VERSION_CODE
436442 struct qdma_mbox * mbox = from_timer (mbox , t , timer );
437443#else
438444 struct qdma_mbox * mbox = (struct qdma_mbox * )arg ;
You can’t perform that action at this time.
0 commit comments