dmx_usb_module: fix 6.6 kernel compile
authorAdam Duskett <adam.duskett@amarulasolutions.com>
Wed, 3 Apr 2024 20:19:00 +0000 (14:19 -0600)
committerRosen Penev <rosenp@gmail.com>
Fri, 5 Apr 2024 20:39:56 +0000 (13:39 -0700)
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
libs/dmx_usb_module/Makefile
libs/dmx_usb_module/patches/101-fix-kernel-6.6-builds.patch [new file with mode: 0644]

index 971648cfad22d07b5731c7f0b1c1186efc13517f..309c6fe13038286fefdf24cd935167d3acfaea18 100644 (file)
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=dmx_usb_module
 PKG_VERSION:=19.12.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/lowlander/dmx_usb_module/tar.gz/V$(PKG_VERSION)?
diff --git a/libs/dmx_usb_module/patches/101-fix-kernel-6.6-builds.patch b/libs/dmx_usb_module/patches/101-fix-kernel-6.6-builds.patch
new file mode 100644 (file)
index 0000000..d0cd7bd
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/dmx_usb.c
++++ b/dmx_usb.c
+@@ -97,7 +97,11 @@ struct dmx_usb_device {
+ /* prevent races between open() and disconnect() */
++#if(LINUX_VERSION_CODE < KERNEL_VERSION(6,5,3))
+       static DEFINE_SEMAPHORE(disconnect_sem);
++#else
++      static DEFINE_SEMAPHORE(disconnect_sem, 1);
++#endif
+ /* local function prototypes */
+ static ssize_t dmx_usb_write  (struct file *file, const char *buffer, size_t count, loff_t *ppos);