Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions 4.18/wacom_wac.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ static void wacom_force_proxout(struct wacom_wac *wacom_wac)

void wacom_idleprox_timeout(struct timer_list *list)
{
#ifdef WACOM_TIMER_ADDR_CONTAINER_RENAME
struct wacom *wacom = timer_container_of(wacom, list, idleprox_timer);
#else
struct wacom *wacom = from_timer(wacom, list, idleprox_timer);
#endif
struct wacom_wac *wacom_wac = &wacom->wacom_wac;

if (!wacom_wac->hid_data.sense_state) {
Expand Down
18 changes: 17 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,23 @@ bool timer_delete_sync(struct timer_list *timer) { return true; }
AC_DEFINE([WACOM_TIMER_DELETE_SYNC], [], [kernel defines timer_delete_sync from v6.1.84+])
])


dnl Check if from_timer has been renamed to timer_container_of or
dnl not. This is the case in Linux 6.16 and later.
AC_MSG_CHECKING(timer_container_of)
WACOM_LINUX_TRY_COMPILE([
#include <linux/timer.h>
#ifndef timer_container_of
#error "timer_container_of is not defined"
#endif
],[
],[
HAVE_TIMER_CONTAINER_OF=yes
AC_MSG_RESULT([yes])
AC_DEFINE([WACOM_TIMER_ADDR_CONTAINER_RENAME], [], [kernel defines timer_container_of from v6.16])
],[
HAVE_TIMER_CONTAINER_OF=no
AC_MSG_RESULT([no])
])

dnl Check which version of the driver we should compile
AC_DEFUN([WCM_EXPLODE], [$(echo "$1" | awk '{split($[0],x,"[[^0-9]]"); printf("%03d%03d%03d\n",x[[1]],x[[2]],x[[3]]);}')])
Expand Down
Loading