ANDROID: cpufreq: times: don't copy invalid freqs from freq table

Invalid frequency checks are a bottleneck in reading
/proc/uid_time_in_state, but there's no reason to include invalid
frequencies in our local copies of frequency tables. Revise
cpufreq_times_create_policy() to only copy valid frequencies, and
eliminate all the checks this change makes unnecessary.

Bug: 111216804
Test: cat /proc/uid_time_in_state & confirm values & format are sane
Test: /proc/uid_time_in_state read times reduced by ~40%
Change-Id: Ib71f002c9dddb8458ba088d73ba61b49deb72b1c
Signed-off-by: Connor O'Brien <connoro@google.com>
1 file changed