From: Francesco VIRLINZI <francesco.virlinzi@st.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH] sh-clkfwk Safer resume from hibenration
Date: Mon, 16 Mar 2009 05:14:14 +0000 [thread overview]
Message-ID: <49BDE026.7020203@st.com> (raw)
In-Reply-To: <49BA1461.7070207@st.com>
[-- Attachment #1: Type: text/plain, Size: 228 bytes --]
This patch fixes a possible problem in the resume from
hibenration. It temporaneally saves the clk->rate on the
stack to avoid any possible change during the clk->set_parent(..)
call
Regards
Francesco
P.S.: Added empty line
[-- Attachment #2: 0001-sh-clkfwk-Safer-resume-from-hibenration.patch --]
[-- Type: text/x-patch, Size: 1315 bytes --]
From c4554c101842c0de279d222c1b45c309dfaaa181 Mon Sep 17 00:00:00 2001
From: Francesco Virlinzi <francesco.virlinzi@st.com>
Date: Mon, 16 Mar 2009 06:12:28 +0100
Subject: [PATCH] sh: clkfwk: Safer resume from hibenration
This patch fixes a possible problem in the resume from
hibenration. It temporaneally saves the clk->rate on the
stack to avoid any possible change during the clk->set_parent(..)
call
Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com>
---
arch/sh/kernel/cpu/clock.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c
index 3209a87..1dc8964 100644
--- a/arch/sh/kernel/cpu/clock.c
+++ b/arch/sh/kernel/cpu/clock.c
@@ -372,12 +372,14 @@ static int clks_sysdev_suspend(struct sys_device *dev, pm_message_t state)
if (prev_state.event == PM_EVENT_FREEZE) {
list_for_each_entry(clkp, &clock_list, node)
if (likely(clkp->ops)) {
+ unsigned long rate = clkp->rate;
+
if (likely(clkp->ops->set_parent))
clkp->ops->set_parent(clkp,
clkp->parent);
if (likely(clkp->ops->set_rate))
clkp->ops->set_rate(clkp,
- clkp->rate, NO_CHANGE);
+ rate, NO_CHANGE);
else if (likely(clkp->ops->recalc))
clkp->ops->recalc(clkp);
}
--
1.5.6.6
next prev parent reply other threads:[~2009-03-16 5:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-13 8:08 [PATCH] sh-clkfwk Safer resume from hibenration Francesco VIRLINZI
2009-03-13 16:33 ` Jean-Christophe PLAGNIOL-VILLARD
2009-03-16 5:14 ` Francesco VIRLINZI [this message]
2009-03-16 11:11 ` Paul Mundt
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=49BDE026.7020203@st.com \
--to=francesco.virlinzi@st.com \
--cc=linux-sh@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.