diff mbox

[2/4] cpufreq: mt8173: remove redundant regulator_get_voltage() call

Message ID 1448785898-17838-2-git-send-email-pi-cheng.chen@linaro.org
State Accepted
Commit 93625d52e7a74492416f77fed945ba34e0ae0c18
Headers show

Commit Message

pi-cheng.chen Nov. 29, 2015, 8:31 a.m. UTC
Remove redundant regulator_get_voltage() call to get Vsram value
since it will be obtained later at the beginning of voltage tracking
loop.

Signed-off-by: Pi-Cheng Chen <pi-cheng.chen@linaro.org>

---
 drivers/cpufreq/mt8173-cpufreq.c | 1 -
 1 file changed, 1 deletion(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Viresh Kumar Nov. 30, 2015, 5:23 a.m. UTC | #1
On 29-11-15, 16:31, Pi-Cheng Chen wrote:
> Remove redundant regulator_get_voltage() call to get Vsram value

> since it will be obtained later at the beginning of voltage tracking

> loop.

> 

> Signed-off-by: Pi-Cheng Chen <pi-cheng.chen@linaro.org>

> ---

>  drivers/cpufreq/mt8173-cpufreq.c | 1 -

>  1 file changed, 1 deletion(-)

> 

> diff --git a/drivers/cpufreq/mt8173-cpufreq.c b/drivers/cpufreq/mt8173-cpufreq.c

> index c438109..750cda7 100644

> --- a/drivers/cpufreq/mt8173-cpufreq.c

> +++ b/drivers/cpufreq/mt8173-cpufreq.c

> @@ -59,7 +59,6 @@ static int mtk_cpufreq_voltage_tracking(struct mtk_cpu_dvfs_info *info,

>  	int old_vproc, old_vsram, new_vsram, vsram, vproc, ret;

>  

>  	old_vproc = regulator_get_voltage(proc_reg);

> -	old_vsram = regulator_get_voltage(sram_reg);

>  	/* Vsram should not exceed the maximum allowed voltage of SoC. */

>  	new_vsram = min(new_vproc + MIN_VOLT_SHIFT, MAX_VOLT_LIMIT);

>  


Acked-by: Viresh Kumar <viresh.kumar@linaro.org>


-- 
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/cpufreq/mt8173-cpufreq.c b/drivers/cpufreq/mt8173-cpufreq.c
index c438109..750cda7 100644
--- a/drivers/cpufreq/mt8173-cpufreq.c
+++ b/drivers/cpufreq/mt8173-cpufreq.c
@@ -59,7 +59,6 @@  static int mtk_cpufreq_voltage_tracking(struct mtk_cpu_dvfs_info *info,
 	int old_vproc, old_vsram, new_vsram, vsram, vproc, ret;
 
 	old_vproc = regulator_get_voltage(proc_reg);
-	old_vsram = regulator_get_voltage(sram_reg);
 	/* Vsram should not exceed the maximum allowed voltage of SoC. */
 	new_vsram = min(new_vproc + MIN_VOLT_SHIFT, MAX_VOLT_LIMIT);