Merge pull request #305018 from j-brn/master

kvmfr: fix build failure for B7-rc1
This commit is contained in:
Janik 2024-05-08 00:40:34 +02:00 committed by GitHub
commit 4965514991
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 19 deletions

View File

@ -6,9 +6,6 @@ stdenv.mkDerivation {
src = looking-glass-client.src;
sourceRoot = "${looking-glass-client.src.name}/module";
patches = lib.optional (kernel.kernelAtLeast "6.4") [
./linux-6-4-compat.patch
];
hardeningDisable = [ "pic" "format" ];
nativeBuildInputs = kernel.moduleBuildDependencies;

View File

@ -1,16 +0,0 @@
diff --git a/kvmfr.c b/kvmfr.c
index 121aae5b..2f4c9e1a 100644
--- a/kvmfr.c
+++ b/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;