Skip to content

Commit 9c97f72

Browse files
committed
Use timer_delete_sync() on 6.15+
1 parent bee13fd commit 9c97f72

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

hdaps.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,11 @@ static int hdaps_probe(struct platform_device *dev)
427427
static int hdaps_suspend(struct platform_device *dev, pm_message_t state)
428428
{
429429
/* Don't do hdaps polls until resume re-initializes the sensor. */
430+
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,15,0)
430431
del_timer_sync(&hdaps_timer);
432+
#else
433+
timer_delete_sync(&hdaps_timer);
434+
#endif
431435
hdaps_device_shutdown(); /* ignore errors, effect is negligible */
432436
return 0;
433437
}
@@ -671,7 +675,11 @@ static void hdaps_mousedev_close(struct input_dev *dev)
671675
{
672676
mutex_lock(&hdaps_users_mtx);
673677
if (--hdaps_users == 0) /* no input users left */
678+
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,15,0)
674679
del_timer_sync(&hdaps_timer);
680+
#else
681+
timer_delete_sync(&hdaps_timer);
682+
#endif
675683
mutex_unlock(&hdaps_users_mtx);
676684

677685
module_put(THIS_MODULE);

0 commit comments

Comments
 (0)