blob: d0cd7bdbb3e2af9b60509da80ef70e7567f6f2ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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);
|