Skip to content

Commit

Permalink
[module] Fix build on Linux 6.4 (fixes #1075)
Browse files Browse the repository at this point in the history
  • Loading branch information
esibun authored and gnif committed Jun 29, 2023
1 parent 5352584 commit e32b292
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion module/dkms.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PACKAGE_NAME="kvmfr"
PACKAGE_VERSION="0.0.8"
PACKAGE_VERSION="0.0.9"
BUILT_MODULE_NAME[0]="${PACKAGE_NAME}"
MAKE[0]="make KDIR=${kernel_source_dir}"
CLEAN="make KDIR=${kernel_source_dir} clean"
Expand Down
4 changes: 4 additions & 0 deletions module/kvmfr.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,11 @@ static int __init kvmfr_module_init(void)
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)) {
printk(KERN_INFO "kvmfr: kvmfr_module_init: failed to create class!\n");
goto out_unreg;
Expand Down

0 comments on commit e32b292

Please sign in to comment.