linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: bilhuang@nvidia.com (Bill Huang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] cpufreq: tegra: Remove not used header and clean up codes
Date: Wed, 11 Sep 2013 04:19:13 -0700	[thread overview]
Message-ID: <1378898355-31290-2-git-send-email-bilhuang@nvidia.com> (raw)
In-Reply-To: <1378898355-31290-1-git-send-email-bilhuang@nvidia.com>

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(-)

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);
 
-- 
1.7.9.5

  reply	other threads:[~2013-09-11 11:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-11 11:19 [PATCH 0/2] Remodel Tegra cpufreq driver to support Tegra series SoCs Bill Huang
2013-09-11 11:19 ` Bill Huang [this message]
2013-09-11 19:19   ` [PATCH 1/2] cpufreq: tegra: Remove not used header and clean up codes Stephen Warren
2013-09-11 11:19 ` [PATCH 2/2] cpufreq: tegra: Re-model Tegra cpufreq driver Bill Huang
2013-09-11 19:33   ` Stephen Warren
2013-09-12  2:03     ` Bill Huang
2013-09-12 10:14   ` Peter De Schrijver
2013-09-12 10:35     ` Bill Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1378898355-31290-2-git-send-email-bilhuang@nvidia.com \
    --to=bilhuang@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).