aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oem-production-readiness
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oem-production-readiness')
-rw-r--r--meta-oem-production-readiness/meta-agl-basesystem/recipes-kernel/kernel-module-evklib/kernel-module-evklib/0001-Handle-switch-to-proc_ops.patch60
-rw-r--r--meta-oem-production-readiness/meta-agl-basesystem/recipes-kernel/kernel-module-evklib/kernel-module-evklib_1.0.0.bb4
2 files changed, 63 insertions, 1 deletions
diff --git a/meta-oem-production-readiness/meta-agl-basesystem/recipes-kernel/kernel-module-evklib/kernel-module-evklib/0001-Handle-switch-to-proc_ops.patch b/meta-oem-production-readiness/meta-agl-basesystem/recipes-kernel/kernel-module-evklib/kernel-module-evklib/0001-Handle-switch-to-proc_ops.patch
new file mode 100644
index 00000000..8d25a0da
--- /dev/null
+++ b/meta-oem-production-readiness/meta-agl-basesystem/recipes-kernel/kernel-module-evklib/kernel-module-evklib/0001-Handle-switch-to-proc_ops.patch
@@ -0,0 +1,60 @@
+From 8755cc145f867d9c82831c6ba7688e3614e394b1 Mon Sep 17 00:00:00 2001
+From: Scott Murray <scott.murray@konsulko.com>
+Date: Wed, 4 May 2022 15:48:10 -0400
+Subject: [PATCH] Handle switch to proc_ops
+
+The proc API switched to using proc_ops instead of file_operations
+in 5.10, add conditional definitions to get the driver compiling
+for both pre/post 5.10.0 for now.
+
+Bug-AGL: SPEC-4343
+
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ module/kernel-module-evklib/evk_lib.c | 23 +++++++++++++++++++++++
+ 1 file changed, 23 insertions(+)
+
+diff --git a/module/kernel-module-evklib/evk_lib.c b/module/kernel-module-evklib/evk_lib.c
+index e6dd238..ff8a749 100755
+--- a/module/kernel-module-evklib/evk_lib.c
++++ b/module/kernel-module-evklib/evk_lib.c
+@@ -1839,6 +1839,7 @@ evk_procFS_queue_open(struct inode *inode, struct file *file)
+ return single_open(file, evk_procFS_queue_show, NULL);
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
+ static struct file_operations evk_proc_flag_fops = {
+ .owner = THIS_MODULE,
+ .open = evk_procFS_flag_open,
+@@ -1862,6 +1863,28 @@ static struct file_operations evk_proc_queue_fops = {
+ .llseek = seq_lseek,
+ .release = single_release,
+ };
++#else
++static struct proc_ops evk_proc_flag_fops = {
++ .proc_open = evk_procFS_flag_open,
++ .proc_read = seq_read,
++ .proc_lseek = seq_lseek,
++ .proc_release = single_release,
++};
++
++static struct proc_ops evk_proc_flag64_fops = {
++ .proc_open = evk_procFS_flag64_open,
++ .proc_read = seq_read,
++ .proc_lseek = seq_lseek,
++ .proc_release = single_release,
++};
++
++static struct proc_ops evk_proc_queue_fops = {
++ .proc_open = evk_procFS_queue_open,
++ .proc_read = seq_read,
++ .proc_lseek = seq_lseek,
++ .proc_release = single_release,
++};
++#endif
+ #endif /*ENABLE_PROC_FS*/
+
+ __init int
+--
+2.35.1
+
diff --git a/meta-oem-production-readiness/meta-agl-basesystem/recipes-kernel/kernel-module-evklib/kernel-module-evklib_1.0.0.bb b/meta-oem-production-readiness/meta-agl-basesystem/recipes-kernel/kernel-module-evklib/kernel-module-evklib_1.0.0.bb
index c40b2704..9f57e532 100644
--- a/meta-oem-production-readiness/meta-agl-basesystem/recipes-kernel/kernel-module-evklib/kernel-module-evklib_1.0.0.bb
+++ b/meta-oem-production-readiness/meta-agl-basesystem/recipes-kernel/kernel-module-evklib/kernel-module-evklib_1.0.0.bb
@@ -7,7 +7,9 @@ LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://LICENSE.GPL-2.0-only;md5=4ee23c52855c222cba72583d301d2338"
PV = "1.0.0+gitr${SRCPV}"
-SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/basesystem.git;protocol=https;branch=${AGL_BRANCH}"
+SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/basesystem.git;protocol=https;branch=${AGL_BRANCH} \
+ file://0001-Handle-switch-to-proc_ops.patch;striplevel=3 \
+"
SRCREV := "${BASESYSTEM_REVISION}"
S = "${WORKDIR}/git/module/kernel-module-evklib"