From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: lethal@linux-sh.org, rjw@sisk.pl
Cc: linux-sh@vger.kernel.org, linux-pm@vger.kernel.org, patches@linaro.org
Subject: [PATCH 2/4] SH: cpuidle: remove CPUIDLE_DRIVER_STATE_START usage
Date: Wed, 17 Apr 2013 15:32:55 +0200 [thread overview]
Message-ID: <1366205577-11632-2-git-send-email-daniel.lezcano@linaro.org> (raw)
In-Reply-To: <1366205577-11632-1-git-send-email-daniel.lezcano@linaro.org>
From: Daniel Lezcano <daniel.lezcano@linaro.or>
The CPUIDLE_DRIVER_STATE_START constant is only set when the kernel compilation
option CONFIG_ARCH_HAS_CPU_RELAX is set, but this is only relatated to x86, so
it is always zero.
Remove the reference to this constant in the code.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
arch/sh/kernel/cpu/shmobile/cpuidle.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/sh/kernel/cpu/shmobile/cpuidle.c b/arch/sh/kernel/cpu/shmobile/cpuidle.c
index 5b44af9..36374cc 100644
--- a/arch/sh/kernel/cpu/shmobile/cpuidle.c
+++ b/arch/sh/kernel/cpu/shmobile/cpuidle.c
@@ -62,9 +62,7 @@ void sh_mobile_setup_cpuidle(void)
struct cpuidle_device *dev = &cpuidle_dev;
struct cpuidle_driver *drv = &cpuidle_driver;
struct cpuidle_state *state;
- int i;
-
- i = CPUIDLE_DRIVER_STATE_START;
+ int i = 0;
state = &drv->states[i++];
snprintf(state->name, CPUIDLE_NAME_LEN, "C1");
@@ -76,7 +74,7 @@ void sh_mobile_setup_cpuidle(void)
state->flags |= CPUIDLE_FLAG_TIME_VALID;
state->enter = cpuidle_sleep_enter;
- drv->safe_state_index = i-1;
+ drv->safe_state_index = 0;
if (sh_mobile_sleep_supported & SUSP_SH_SF) {
state = &drv->states[i++];
--
1.7.9.5
next prev parent reply other threads:[~2013-04-17 13:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-17 13:32 [PATCH 1/4] SH: cpuidle: remove pointless initialization Daniel Lezcano
2013-04-17 13:32 ` Daniel Lezcano [this message]
2013-04-17 13:32 ` [PATCH 3/4] SH: cpuidle: initialize the driver's states directly Daniel Lezcano
2013-04-17 13:32 ` [PATCH 4/4] SH: cpuidle: check error code at init Daniel Lezcano
2013-04-18 1:18 ` [PATCH 1/4] SH: cpuidle: remove pointless initialization Simon Horman
2013-04-18 9:18 ` Daniel Lezcano
2013-04-18 13:34 ` Simon Horman
2013-04-18 13:35 ` Daniel Lezcano
2013-04-21 23:28 ` Rafael J. Wysocki
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=1366205577-11632-2-git-send-email-daniel.lezcano@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=lethal@linux-sh.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=patches@linaro.org \
--cc=rjw@sisk.pl \
/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).