This is a multi-part MIME message sent by reportbug.
Source: osmocom-dahdi-linux
Version: 0.0~git20241003.b2ea348-4
Severity: normal
Tags: patch
Hi,
I'm attaching two patches to synchronize the -dkms package with
src:dahdi-linux s.t. both support the same range of kernel versions.
Andreas
From a224d0512d73a1d72136d3ddf4fbdfd32fcd89ee Mon Sep 17 00:00:00 2001
From: Andreas Beckmann <
anbe@debian.org>
Date: Sat, 5 Apr 2025 00:14:54 +0200
Subject: [PATCH 1/2] import 1190-timer_setup.patch from src:dahdi-linux
---
debian/patches/1190-timer_setup.patch | 41 +++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 42 insertions(+)
create mode 100644 debian/patches/1190-timer_setup.patch
diff --git a/debian/patches/1190-timer_setup.patch b/debian/patches/1190-timer_setup.patch
new file mode 100644
index 0000000..23875d9
--- /dev/null
+++ b/debian/patches/1190-timer_setup.patch
@@ -0,0 +1,41 @@
+Author: Andreas Beckmann <
anbe@debian.org>
+Description: timer_setup() was introduced in Linux v4.14
+
+--- a/include/dahdi/kernel.h
++++ b/include/dahdi/kernel.h
+@@ -1410,7 +1410,16 @@ static inline short dahdi_txtone_nextsam
+ #define TIMER_DATA_TYPE unsigned long
+ #endif
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
++
++/* timer_setup and friends in 4.14 had a slightly different interface than in 4.15+ */
++#define timer_setup(timer, callback, flags) __setup_timer((timer), (TIMER_FUNC_TYPE)(callback)