tuxedo_io: Adjust class_create call for kernel 6.4 compatibility

Implements #82
This commit is contained in:
Christoffer Sandberg 2023-06-19 15:46:52 +02:00
parent c51c01e3f2
commit 04112f65ec
No known key found for this signature in database
GPG key ID: BF563F71B6C7A96D

View file

@ -823,7 +823,13 @@ static int __init tuxedo_io_init(void)
pr_err("Failed to add cdev\n");
unregister_chrdev_region(tuxedo_io_device_handle, 1);
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
tuxedo_io_device_class = class_create(THIS_MODULE, "tuxedo_io");
#else
tuxedo_io_device_class = class_create("tuxedo_io");
#endif
device_create(tuxedo_io_device_class, NULL, tuxedo_io_device_handle, NULL, "tuxedo_io");
pr_debug("Module init successful\n");