From 0d63386343e56ff3f20c4a65f71bcd3f281b1ffa Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Wed, 6 Jun 2018 15:25:42 +0100 Subject: [PATCH] module/cpufreq: include policy0 in probe path Check /sys/devices/system/cpu/cpufreq/policy0 rather than its parent during the probe. This is to handle the edge case where cpufreq has been enabled in the kernel, but no frequency domains have been defined (in which case, the module should not install). --- devlib/module/cpufreq.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devlib/module/cpufreq.py b/devlib/module/cpufreq.py index 0380838..3a3892d 100644 --- a/devlib/module/cpufreq.py +++ b/devlib/module/cpufreq.py @@ -37,7 +37,7 @@ class CpufreqModule(Module): return True # Generic CPUFreq support (single policy) - path = '/sys/devices/system/cpu/cpufreq' + path = '/sys/devices/system/cpu/cpufreq/policy0' if target.file_exists(path): return True