From: thierry.reding@gmail.com (Thierry Reding)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: pxa: z2: Fix section mismatch
Date: Mon, 5 Oct 2015 10:37:08 +0200 [thread overview]
Message-ID: <1444034228-9249-1-git-send-email-thierry.reding@gmail.com> (raw)
The z2_power_off() function calls pxa27x_set_pwrmode(), which is marked
__init. z2_power_off() is set up as the power off handler, so will need
to stick around after __init data is discarded. Fix this by doing what
everyone else does and set the power mode from the board initialization
code instead.
Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
---
arch/arm/mach-pxa/z2.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c
index e1a121b36cfa..36caac726ea7 100644
--- a/arch/arm/mach-pxa/z2.c
+++ b/arch/arm/mach-pxa/z2.c
@@ -690,11 +690,8 @@ static void z2_power_off(void)
*/
PSPR = 0x0;
local_irq_disable();
- pxa27x_set_pwrmode(PWRMODE_DEEPSLEEP);
pxa27x_cpu_pm_enter(PM_SUSPEND_MEM);
}
-#else
-#define z2_power_off NULL
#endif
/******************************************************************************
@@ -719,7 +716,10 @@ static void __init z2_init(void)
z2_keys_init();
z2_pmic_init();
+#ifdef CONFIG_PM
+ pxa27x_set_pwrmode(PWRMODE_DEEPSLEEP);
pm_power_off = z2_power_off;
+#endif
}
MACHINE_START(ZIPIT2, "Zipit Z2")
--
2.5.0
next reply other threads:[~2015-10-05 8:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-05 8:37 Thierry Reding [this message]
2015-10-05 19:50 ` [PATCH] ARM: pxa: z2: Fix section mismatch Robert Jarzmik
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=1444034228-9249-1-git-send-email-thierry.reding@gmail.com \
--to=thierry.reding@gmail.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).