From efad0f17d555b599946176a23ac813065585d977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A1ndor=20Istv=C3=A1n=20Kr=C3=A1cser?= Date: Tue, 18 Jun 2024 11:12:06 +0200 Subject: [PATCH] fix class_create on red hat linuxes --- src/device_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);