diff options
Diffstat (limited to 'power-8916.c')
-rw-r--r-- | power-8916.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/power-8916.c b/power-8916.c index 190b336..66b57e7 100644 --- a/power-8916.c +++ b/power-8916.c @@ -60,19 +60,18 @@ const char *scaling_min_freq[4] = { }; /** - * If target is 8916: - * return true - * else: - * return false + * Returns true if the target is MSM8916. */ static bool is_target_8916(void) { - static bool is_8916 = false; + static int is_8916 = -1; int soc_id; + if (is_8916 >= 0) + return is_8916; + soc_id = get_soc_id(); - if (soc_id == 206 || (soc_id >= 247 && soc_id <= 250)) - is_8916 = true; + is_8916 = soc_id == 206 || (soc_id >= 247 && soc_id <= 250); return is_8916; } |