diff mbox

[1/2] cpufreq: tegra: Remove not used header and clean up codes

Message ID 1378898355-31290-2-git-send-email-bilhuang@nvidia.com (mailing list archive)
State New, archived
Headers show

Commit Message

Bill Huang Sept. 11, 2013, 11:19 a.m. UTC
Remove inclustion of the not needed header files and remove the logic
to check the CPU ID to not exceeding the maximum supported CPUs.

Signed-off-by: Bill Huang <bilhuang@nvidia.com>
---
 drivers/cpufreq/tegra-cpufreq.c |   14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

Comments

Stephen Warren Sept. 11, 2013, 7:19 p.m. UTC | #1
On 09/11/2013 05:19 AM, Bill Huang wrote:
> Remove inclustion of the not needed header files and remove the logic
> to check the CPU ID to not exceeding the maximum supported CPUs.

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

> - * Copyright (C) 2010 Google, Inc.
> + * Copyright (c) 2013, NVIDIA Corporation.
> + * Copyright (C) 2010-2013 Google, Inc.

This is such a trivial patch, I don't think it's appropriate to add an
NVIDIA (c) notice. It may well be appropriate in patch 2/2.

I assume that Google didn't write this patch, so why adjust that (c) notice?
diff mbox

Patch

diff --git a/drivers/cpufreq/tegra-cpufreq.c b/drivers/cpufreq/tegra-cpufreq.c
index a7b876f..6eb3dd8 100644
--- a/drivers/cpufreq/tegra-cpufreq.c
+++ b/drivers/cpufreq/tegra-cpufreq.c
@@ -1,5 +1,6 @@ 
 /*
- * Copyright (C) 2010 Google, Inc.
+ * Copyright (c) 2013, NVIDIA Corporation.
+ * Copyright (C) 2010-2013 Google, Inc.
  *
  * Author:
  *	Colin Cross <ccross@google.com>
@@ -18,14 +19,9 @@ 
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/types.h>
-#include <linux/sched.h>
 #include <linux/cpufreq.h>
-#include <linux/delay.h>
-#include <linux/init.h>
 #include <linux/err.h>
 #include <linux/clk.h>
-#include <linux/io.h>
 #include <linux/suspend.h>
 
 static struct cpufreq_frequency_table freq_table[] = {
@@ -60,9 +56,6 @@  static unsigned int tegra_getspeed(unsigned int cpu)
 {
 	unsigned long rate;
 
-	if (cpu >= NUM_CPUS)
-		return 0;
-
 	rate = clk_get_rate(cpu_clk) / 1000;
 	return rate;
 }
@@ -209,9 +202,6 @@  static struct notifier_block tegra_cpu_pm_notifier = {
 
 static int tegra_cpu_init(struct cpufreq_policy *policy)
 {
-	if (policy->cpu >= NUM_CPUS)
-		return -EINVAL;
-
 	clk_prepare_enable(emc_clk);
 	clk_prepare_enable(cpu_clk);