From 34efe5d3e6c79e5fddf78350da6fe4b7de0a63a8 Mon Sep 17 00:00:00 2001 From: CyrIng Date: Thu, 2 Mar 2023 08:29:21 +0000 Subject: Take into account the `cpufreq_unregister_driver` prototype change * starting from Kernel 6.3 * unconditionally with CachyOS --- corefreqk.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/corefreqk.c b/corefreqk.c index 74d2817..6bb641d 100644 --- a/corefreqk.c +++ b/corefreqk.c @@ -20623,7 +20623,12 @@ static int CoreFreqK_FreqDriver_UnInit(void) { int rc = -EINVAL; #ifdef CONFIG_CPU_FREQ - rc = cpufreq_unregister_driver(&CoreFreqK.FreqDriver); +#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0)) && (!defined(CONFIG_CACHY)) + rc = +#else + rc = 0; +#endif + cpufreq_unregister_driver(&CoreFreqK.FreqDriver); #endif /* CONFIG_CPU_FREQ */ return rc; } -- cgit v1.2.3