Skip to content

Commit

Permalink
msm_performance: simplify touchboost check and process
Browse files Browse the repository at this point in the history
Signed-off-by: engstk <eng.stk@sapo.pt>
  • Loading branch information
engstk authored and acuicultor committed Oct 25, 2020
1 parent 1a42951 commit 073cc67
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions drivers/soc/qcom/msm_performance.c
Expand Up @@ -90,10 +90,9 @@ static int set_cpu_min_freq(const char *buf, const struct kernel_param *kp)
#ifdef CONFIG_CONTROL_CENTER
bool boost_on_big_hint = false;
#endif
const char *reset = "0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0";

if (touchboost == 0)
cp = reset;
return 0;

while ((cp = strpbrk(cp + 1, " :")))
ntokens++;
Expand All @@ -102,10 +101,7 @@ static int set_cpu_min_freq(const char *buf, const struct kernel_param *kp)
if (!(ntokens % 2))
return -EINVAL;

if (touchboost == 0)
cp = reset;
else
cp = buf;
cp = buf;

cpumask_clear(limit_mask);
for (i = 0; i < ntokens; i += 2) {
Expand Down Expand Up @@ -197,10 +193,9 @@ static int set_cpu_max_freq(const char *buf, const struct kernel_param *kp)
struct cpu_status *i_cpu_stats;
struct cpufreq_policy policy;
cpumask_var_t limit_mask;
const char *reset = "0:4294967295 1:4294967295 2:4294967295 3:4294967295 4:4294967295 5:4294967295 6:4294967295 7:4294967295";

if (touchboost == 0)
cp = reset;
return 0;

while ((cp = strpbrk(cp + 1, " :")))
ntokens++;
Expand All @@ -209,10 +204,7 @@ static int set_cpu_max_freq(const char *buf, const struct kernel_param *kp)
if (!(ntokens % 2))
return -EINVAL;

if (touchboost == 0)
cp = reset;
else
cp = buf;
cp = buf;

cpumask_clear(limit_mask);
for (i = 0; i < ntokens; i += 2) {
Expand Down

0 comments on commit 073cc67

Please sign in to comment.