1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-15 11:53:59 +02:00
openwrt-packages/libs/dmx_usb_module/patches/101-fix-kernel-6.6-builds.patch
Adam Duskett 9233703a1e dmx_usb_module: fix 6.6 kernel compile
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
2024-04-05 13:39:56 -07:00

15 lines
419 B
Diff

--- 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);