diff options
author | PA4WDH | 2024-09-12 14:13:38 +0200 |
---|---|---|
committer | PA4WDH | 2024-09-12 14:13:38 +0200 |
commit | 1b34033b156401a2ed92bdd8cc0dd44a5579e4ca (patch) | |
tree | 8c2ada5be5c8a8078f9f0fd496c2901df907cf29 /cputemp2maxfreq.c | |
parent | Improve signal handling (diff) | |
download | cputemp2maxfreq-1b34033b156401a2ed92bdd8cc0dd44a5579e4ca.tar.gz cputemp2maxfreq-1b34033b156401a2ed92bdd8cc0dd44a5579e4ca.tar.bz2 cputemp2maxfreq-1b34033b156401a2ed92bdd8cc0dd44a5579e4ca.zip |
Move more calls from sysfs_read_long_int to cpufreq_get_long_int
Diffstat (limited to 'cputemp2maxfreq.c')
-rw-r--r-- | cputemp2maxfreq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cputemp2maxfreq.c b/cputemp2maxfreq.c index 212fb39..5137d16 100644 --- a/cputemp2maxfreq.c +++ b/cputemp2maxfreq.c @@ -313,7 +313,7 @@ int main(int argc,char **argv) config.logger("Failed to set scaling_max_freq, exiting"); failsafe(1); } - cpudata.scale_max=sysfs_read_long_int("/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq"); + cpudata.scale_max=cpufreq_get_long_int("scaling_max_freq"); if ((cpudata.scale_max<VALID_FREQ_MIN) || (cpudata.scale_max>VALID_FREQ_MAX)) { config.logger("Invalid scale_max_freq reported, exiting"); @@ -335,7 +335,7 @@ int main(int argc,char **argv) config.logger("Failed to set scaling_max_freq, exiting"); failsafe(1); } - cpudata.scale_max=sysfs_read_long_int("/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq"); + cpudata.scale_max=cpufreq_get_long_int("scaling_max_freq"); if ((cpudata.scale_max<VALID_FREQ_MIN) || (cpudata.scale_max>VALID_FREQ_MAX)) { config.logger("Invalid scale_max_freq reported, exiting"); |