Skip to content

Commit bc40723

Browse files
configure.ac: add lines for applying pm_ptr
Add lines to check the availability of pm_ptr function related to the commit, a864d16be156. Signed-off-by: Tatsunosuke Tobita <tatsunosuke.tobita@wacom.com>
1 parent 9730d7d commit bc40723

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

configure.ac

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,24 @@ WACOM_LINUX_TRY_COMPILE([
321321
AC_MSG_RESULT([no])
322322
])
323323

324+
dnl Check if pm_ptr has been added to pm.h or
325+
dnl not. This is the case in Linux 5.9 and later.
326+
AC_MSG_CHECKING(pm_ptr)
327+
WACOM_LINUX_TRY_COMPILE([
328+
#include <linux/pm.h>
329+
#ifndef pm_ptr
330+
#error "pm_ptr is not defined"
331+
#endif
332+
],[
333+
],[
334+
HAVE_PM_PTR=yes
335+
AC_MSG_RESULT([yes])
336+
AC_DEFINE([WACOM_PM_PTR], [], [kernel defines pm_ptr from v5.9])
337+
],[
338+
HAVE_PM_PTR=no
339+
AC_MSG_RESULT([no])
340+
])
341+
324342
dnl Check which version of the driver we should compile
325343
AC_DEFUN([WCM_EXPLODE], [$(echo "$1" | awk '{split($[0],x,"[[^0-9]]"); printf("%03d%03d%03d\n",x[[1]],x[[2]],x[[3]]);}')])
326344
EXPLODED_VER="WCM_EXPLODE($MODUTS)"

0 commit comments

Comments
 (0)