diff options
Diffstat (limited to 'power-660.c')
-rw-r--r-- | power-660.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/power-660.c b/power-660.c index ac1137e..0bec132 100644 --- a/power-660.c +++ b/power-660.c @@ -140,19 +140,18 @@ static int set_power_profile(int profile) } /** - * If target is SDM630: - * return true - * else: - * return false + * Returns true if the target is SDM630. */ static bool is_target_SDM630(void) { - static bool is_SDM630 = false; + static int is_SDM630 = -1; int soc_id; + if (is_SDM630 >= 0) + return is_SDM630; + soc_id = get_soc_id(); - if (soc_id == 318 || soc_id == 327) - is_SDM630 = true; + is_SDM630 = soc_id == 318 || soc_id == 327; return is_SDM630; } |