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