ayaports/backports/looking-glass/module_1075-fix-build-linux64.patch

26 lines
764 B
Diff
Raw Normal View History

2024-07-31 03:39:19 +00:00
From e32b292cc1ba089db6ed28e4d5eb0fc8cc4c2235 Mon Sep 17 00:00:00 2001
From: esi <git@esibun.net>
Date: Fri, 12 May 2023 16:28:01 -0400
Subject: [PATCH] [module] Fix build on Linux 6.4 (fixes #1075)
---
module/dkms.conf | 2 +-
module/kvmfr.c | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/module/kvmfr.c b/module/kvmfr.c
index ca0cca685..c711e000e 100644
--- a/module/kvmfr.c
+++ b/module/kvmfr.c
@@ -539,7 +539,11 @@ static int __init kvmfr_module_init(void)
if (kvmfr->major < 0)
goto out_free;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
kvmfr->pClass = class_create(THIS_MODULE, KVMFR_DEV_NAME);
+#else
+ kvmfr->pClass = class_create(KVMFR_DEV_NAME);
+#endif
if (IS_ERR(kvmfr->pClass))
goto out_unreg;