Skip to content
This repository was archived by the owner on Sep 19, 2024. It is now read-only.

Commit efad0f1

Browse files
committed
fix class_create on red hat linuxes
1 parent eae0ee8 commit efad0f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/device_driver.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ int chardev_init(void)
6666

6767
pr_info("char device registered # major[%d]", major);
6868

69-
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
69+
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) && !defined(RHEL_RELEASE)
7070
cls = class_create(THIS_MODULE, DEVICE_NAME);
7171
#else
7272
cls = class_create(DEVICE_NAME);

0 commit comments

Comments
 (0)