Skip to content

Commit

Permalink
[AArch64] Build with Redhat RHEL version 9
Browse files Browse the repository at this point in the history
  • Loading branch information
cyring committed Jun 7, 2024
1 parent 4bc38d6 commit 3e136b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions aarch64/corefreqk.c
Original file line number Diff line number Diff line change
Expand Up @@ -3905,7 +3905,8 @@ static int CoreFreqK_FreqDriver_UnInit(void)
{
int rc = -EINVAL;
#ifdef CONFIG_CPU_FREQ
#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0)) && (!defined(CONFIG_CACHY))
#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0)) && (!defined(CONFIG_CACHY)) \
&& (!defined(RHEL_MAJOR))
rc =
#else
rc = 0;
Expand Down Expand Up @@ -5357,7 +5358,7 @@ inline void SMBIOS_Decoder(void)
#endif /* CONFIG_DMI */
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0) || (RHEL_MAJOR >= 9)
static char *CoreFreqK_DevNode(const struct device *dev, umode_t *mode)
#else
static char *CoreFreqK_DevNode(struct device *dev, umode_t *mode)
Expand Down Expand Up @@ -5501,7 +5502,7 @@ static int CoreFreqK_Create_Device_Level_Up(INIT_ARG *pArg)
struct device *tmpDev;
UNUSED(pArg);

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0) || (RHEL_MAJOR >= 9)
CoreFreqK.clsdev = class_create(DRV_DEVNAME);
#else
CoreFreqK.clsdev = class_create(THIS_MODULE, DRV_DEVNAME);
Expand Down
4 changes: 2 additions & 2 deletions aarch64/coretypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/

#define COREFREQ_MAJOR 1
#define COREFREQ_MINOR 97
#define COREFREQ_REV 2
#define COREFREQ_MINOR 98
#define COREFREQ_REV 0

#if !defined(CORE_COUNT)
#define CORE_COUNT 256
Expand Down

0 comments on commit 3e136b3

Please sign in to comment.