niksos/hosts/niks/ddcci_semaphore_fix.patch

17 lines
476 B
Diff
Raw Normal View History

diff --git a/ddcci/ddcci.c b/ddcci/ddcci.c
index ea76352..3c75b90 100644
--- a/ddcci/ddcci.c
+++ b/ddcci/ddcci.c
@@ -39,7 +39,11 @@ static int autoprobe_addr_count = 5;
static dev_t ddcci_cdev_first;
static dev_t ddcci_cdev_next;
static dev_t ddcci_cdev_end;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
+static DEFINE_SEMAPHORE(core_lock, 1);
+#else
static DEFINE_SEMAPHORE(core_lock);
+#endif
struct bus_type ddcci_bus_type;
EXPORT_SYMBOL_GPL(ddcci_bus_type);