From: Bill Huang <bilhuang@nvidia.com>
To: <rjw@sisk.pl>, <viresh.kumar@linaro.org>, <swarren@wwwdotorg.org>
Cc: <linux@arm.linux.org.uk>, <linux-arm-kernel@lists.infradead.org>,
<linux-tegra@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<cpufreq@vger.kernel.org>, <linux-pm@vger.kernel.org>,
Bill Huang <bilhuang@nvidia.com>
Subject: [PATCH v2 2/4] cpufreq: tegra: Remove not used header files and clean up codes
Date: Thu, 12 Sep 2013 04:24:49 -0700 [thread overview]
Message-ID: <1378985091-9447-3-git-send-email-bilhuang@nvidia.com> (raw)
In-Reply-To: <1378985091-9447-1-git-send-email-bilhuang@nvidia.com>
Remove the 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 | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/drivers/cpufreq/tegra-cpufreq.c b/drivers/cpufreq/tegra-cpufreq.c
index 09c5af0..c2d2910 100644
--- a/drivers/cpufreq/tegra-cpufreq.c
+++ b/drivers/cpufreq/tegra-cpufreq.c
@@ -18,14 +18,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[] = {
@@ -40,14 +35,14 @@ static struct cpufreq_frequency_table freq_table[] = {
{ .frequency = CPUFREQ_TABLE_END },
};
-#define NUM_CPUS 2
+#define MAX_CPUS 4
static struct clk *cpu_clk;
static struct clk *pll_x_clk;
static struct clk *pll_p_clk;
static struct clk *emc_clk;
-static unsigned long target_cpu_speed[NUM_CPUS];
+static unsigned long target_cpu_speed[MAX_CPUS];
static DEFINE_MUTEX(tegra_cpu_lock);
static bool is_suspended;
@@ -60,9 +55,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 +201,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
next prev parent reply other threads:[~2013-09-12 11:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-12 11:24 [PATCH v2 0/4] Remodel Tegra cpufreq driver to support Tegra series SoCs Bill Huang
2013-09-12 11:24 ` [PATCH v2 1/4] cpufreq: tegra: Call tegra_cpufreq_init() specifically in machine code Bill Huang
2013-09-12 11:24 ` Bill Huang [this message]
2013-09-12 11:24 ` [PATCH v2 3/4] cpufreq: tegra: Re-model Tegra cpufreq driver Bill Huang
2013-09-13 22:26 ` Stephen Warren
2013-09-14 2:00 ` Bill Huang
2013-09-12 11:24 ` [PATCH v2 4/4] ARM: tegra: defconfig updates Bill Huang
2013-09-12 11:27 ` [PATCH v2 0/4] Remodel Tegra cpufreq driver to support Tegra series SoCs Viresh Kumar
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=1378985091-9447-3-git-send-email-bilhuang@nvidia.com \
--to=bilhuang@nvidia.com \
--cc=cpufreq@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=rjw@sisk.pl \
--cc=swarren@wwwdotorg.org \
--cc=viresh.kumar@linaro.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