cpufreq: fix kernel panic and compiling