summaryrefslogtreecommitdiff
path: root/cpufreq/src/cpufreq-selector/cpufreq-selector-factory.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-11-28 20:26:22 +0100
committerraveit65 <[email protected]>2020-12-09 21:16:36 +0100
commit4cb6f915b1a91497df1b13cdab887df1bdaed101 (patch)
treeef32f9e4d6f6f75de2e15da5bff69562ac7581dc /cpufreq/src/cpufreq-selector/cpufreq-selector-factory.c
parent66b18c097d5ae6e7bcf712820bc3e6594c8cb79a (diff)
downloadmate-applets-4cb6f915b1a91497df1b13cdab887df1bdaed101.tar.bz2
mate-applets-4cb6f915b1a91497df1b13cdab887df1bdaed101.tar.xz
cpufreq: Remove /proc/cpufreq support (Linux 2.4)
Diffstat (limited to 'cpufreq/src/cpufreq-selector/cpufreq-selector-factory.c')
-rw-r--r--cpufreq/src/cpufreq-selector/cpufreq-selector-factory.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/cpufreq/src/cpufreq-selector/cpufreq-selector-factory.c b/cpufreq/src/cpufreq-selector/cpufreq-selector-factory.c
index 9f9bd29d..0328ea40 100644
--- a/cpufreq/src/cpufreq-selector/cpufreq-selector-factory.c
+++ b/cpufreq/src/cpufreq-selector/cpufreq-selector-factory.c
@@ -22,26 +22,24 @@
#endif
#include "cpufreq-selector-factory.h"
-#include "cpufreq-selector-sysfs.h"
-#include "cpufreq-selector-procfs.h"
#ifdef HAVE_LIBCPUFREQ
#include "cpufreq-selector-libcpufreq.h"
+#else
+#include "cpufreq-selector-sysfs.h"
#endif
CPUFreqSelector *
cpufreq_selector_factory_create_selector (guint cpu)
{
- CPUFreqSelector *selector = NULL;
-
#ifdef HAVE_LIBCPUFREQ
- selector = cpufreq_selector_libcpufreq_new (cpu);
+ return cpufreq_selector_libcpufreq_new (cpu);
#else
- if (g_file_test ("/sys/devices/system/cpu/cpu0/cpufreq", G_FILE_TEST_EXISTS)) { /* 2.6 kernel */
+ CPUFreqSelector *selector = NULL;
+
+ if (g_file_test ("/sys/devices/system/cpu/cpu0/cpufreq", G_FILE_TEST_EXISTS)) {
selector = cpufreq_selector_sysfs_new (cpu);
- } else if (g_file_test ("/proc/cpufreq", G_FILE_TEST_EXISTS)) { /* 2.4 kernel */
- selector = cpufreq_selector_procfs_new (cpu);
}
-#endif /* HAVE_LIBCPUFREQ */
return selector;
+#endif /* HAVE_LIBCPUFREQ */
}