diff mbox

cpufreq: Tegra: drop wrapper around tegra_update_cpu_speed()

Message ID a38df05b91198f393b1c4b78f39110c6bece3627.1400133049.git.viresh.kumar@linaro.org
State New
Headers show

Commit Message

Viresh Kumar May 15, 2014, 5:51 a.m. UTC
Tegra has implemented an unnecessary wrapper over tegra_update_cpu_speed(), i.e.
tegra_target(), which wasn't doing anything apart of calling
tegra_update_cpu_speed(). Get rid of that and use tegra_target() directly.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/tegra-cpufreq.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

Comments

Stephen Warren May 15, 2014, 6:44 p.m. UTC | #1
On 05/14/2014 11:51 PM, Viresh Kumar wrote:
> Tegra has implemented an unnecessary wrapper over tegra_update_cpu_speed(), i.e.
> tegra_target(), which wasn't doing anything apart of calling
> tegra_update_cpu_speed(). Get rid of that and use tegra_target() directly.

I think it used to do something until some refactoring happened? Anyway,

Acked-by: Stephen Warren <swarren@nvidia.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Viresh Kumar May 16, 2014, 6:06 a.m. UTC | #2
On 16 May 2014 00:14, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 05/14/2014 11:51 PM, Viresh Kumar wrote:
>> Tegra has implemented an unnecessary wrapper over tegra_update_cpu_speed(), i.e.
>> tegra_target(), which wasn't doing anything apart of calling
>> tegra_update_cpu_speed(). Get rid of that and use tegra_target() directly.
>
> I think it used to do something until some refactoring happened? Anyway,

Yep..

> Acked-by: Stephen Warren <swarren@nvidia.com>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Rafael J. Wysocki May 19, 2014, 11:25 p.m. UTC | #3
On Friday, May 16, 2014 11:36:48 AM Viresh Kumar wrote:
> On 16 May 2014 00:14, Stephen Warren <swarren@wwwdotorg.org> wrote:
> > On 05/14/2014 11:51 PM, Viresh Kumar wrote:
> >> Tegra has implemented an unnecessary wrapper over tegra_update_cpu_speed(), i.e.
> >> tegra_target(), which wasn't doing anything apart of calling
> >> tegra_update_cpu_speed(). Get rid of that and use tegra_target() directly.
> >
> > I think it used to do something until some refactoring happened? Anyway,
> 
> Yep..
> 
> > Acked-by: Stephen Warren <swarren@nvidia.com>

Patch queued up for 3.16, thanks!
diff mbox

Patch

diff --git a/drivers/cpufreq/tegra-cpufreq.c b/drivers/cpufreq/tegra-cpufreq.c
index 63f0059..6e774c6 100644
--- a/drivers/cpufreq/tegra-cpufreq.c
+++ b/drivers/cpufreq/tegra-cpufreq.c
@@ -82,9 +82,9 @@  out:
 	return ret;
 }
 
-static int tegra_update_cpu_speed(struct cpufreq_policy *policy,
-		unsigned long rate)
+static int tegra_target(struct cpufreq_policy *policy, unsigned int index)
 {
+	unsigned long rate = freq_table[index].frequency;
 	int ret = 0;
 
 	/*
@@ -106,11 +106,6 @@  static int tegra_update_cpu_speed(struct cpufreq_policy *policy,
 	return ret;
 }
 
-static int tegra_target(struct cpufreq_policy *policy, unsigned int index)
-{
-	return tegra_update_cpu_speed(policy, freq_table[index].frequency);
-}
-
 static int tegra_cpu_init(struct cpufreq_policy *policy)
 {
 	int ret;