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

Commit

Permalink
fix class_create on red hat linuxes
Browse files Browse the repository at this point in the history
  • Loading branch information
bonifaido committed Jun 18, 2024
1 parent eae0ee8 commit efad0f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/device_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit efad0f1

Please sign in to comment.