diff --git a/projects/WeTek_Play/initramfs/platform_init b/projects/WeTek_Play/initramfs/platform_init index b95b3e16bf..d4a0f37483 100755 --- a/projects/WeTek_Play/initramfs/platform_init +++ b/projects/WeTek_Play/initramfs/platform_init @@ -63,12 +63,7 @@ for arg in $(cat /proc/cmdline); do done # Boot with performance governor, then switch to the governor specified in the kernel command line -cpu_idx=0 -while [ $cpu_idx -lt 128 ]; do - cpufreq="/sys/devices/system/cpu/cpu$cpu_idx/cpufreq" - if [ ! -d "$cpufreq" ]; then - break - fi +for cpufreq in /sys/devices/system/cpu/cpu[0-9]*/cpufreq; do if [ -n "$scaling_governor" ]; then echo "$scaling_governor" > "$cpufreq/scaling_governor" fi @@ -78,5 +73,4 @@ while [ $cpu_idx -lt 128 ]; do if [ -n "$scaling_max_freq" ]; then echo "$scaling_max_freq" > "$cpufreq/scaling_max_freq" fi - cpu_idx=`expr $cpu_idx + 1` done