diff --git a/src/device_driver.c b/src/device_driver.c index c9288f31..f81a1e7c 100644 --- a/src/device_driver.c +++ b/src/device_driver.c @@ -66,7 +66,7 @@ int chardev_init(void) pr_info("char device registered # major[%d]", major); -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) && !defined(RHEL_RELEASE) cls = class_create(THIS_MODULE, DEVICE_NAME); #else cls = class_create(DEVICE_NAME);