1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
Description: fix linux 6.4 semaphore definition
Date: Mon, 10 Jul 2023 09:36:35 +0000
Author: Paolo Pisati <p.pisati@canonical.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/2026714
Origin: https://bugs.launchpad.net/ubuntu/+source/sl-modem/+bug/2026714/+attachment/5685138/+files/sl-modem_2.9.11~20110321-18ubuntu1.debdiff
diff --git a/drivers/st7554.c b/drivers/st7554.c
index 9dc09af..fff2f76 100644
--- a/drivers/st7554.c
+++ b/drivers/st7554.c
@@ -243,8 +243,10 @@ static struct class *st7554_class;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
static DECLARE_MUTEX(open_sem);
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(6,4,0)
static DEFINE_SEMAPHORE(open_sem);
+#else
+static DEFINE_SEMAPHORE(open_sem, 1);
#endif
/* --------------------------------------------------------------------- */
|