SUPERH platform development
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: linux-sh@vger.kernel.org
Subject: Re: sh7372 compile breakage in current -next
Date: Wed, 16 Nov 2011 22:42:34 +0000	[thread overview]
Message-ID: <201111162342.34184.rjw@sisk.pl> (raw)
In-Reply-To: <201111162325.51517.rjw@sisk.pl>

On Wednesday, November 16, 2011, Rafael J. Wysocki wrote:
> On Wednesday, November 16, 2011, Rafael J. Wysocki wrote:
> > On Wednesday, November 16, 2011, Guennadi Liakhovetski wrote:
> > > arch/arm/mach-shmobile/pm-sh7372.c: In function 'sh7372_pm_init':
> > > arch/arm/mach-shmobile/pm-sh7372.c:476: error: 'sh7372_a3sp' undeclared (first use in this function)
> > > arch/arm/mach-shmobile/pm-sh7372.c:476: error: (Each undeclared identifier is reported only once
> > > arch/arm/mach-shmobile/pm-sh7372.c:476: error: for each function it appears in.)
> > > make[2]: *** [arch/arm/mach-shmobile/pm-sh7372.o] Error 1
> > 
> > OK, I'll have a look at that.
> > 
> > What's the .config you used?
> 
> Do you have CONFIG_PM unset, perchance?

Well, I'm quite sure you do.  The appended patch should help, then.

Thanks,
Rafael

---
From: Rafael J. Wysocki <rjw@sisk.pl>
Subject: PM / shmobile: Fix build of sh7372_pm_init() for CONFIG_PM unset

Fix build regression introduced by commit 056879d2f244001b2888cdc8cf
(ARM: mach-shmobile: sh7372 A3SP no_suspend_console fix) by moving
the intialization of the A3SP domain to a separate function and
providing an empty definition of it for CONFIG_PM unset.

Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 arch/arm/mach-shmobile/pm-sh7372.c |   19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

Index: linux/arch/arm/mach-shmobile/pm-sh7372.c
=================================--- linux.orig/arch/arm/mach-shmobile/pm-sh7372.c
+++ linux/arch/arm/mach-shmobile/pm-sh7372.c
@@ -232,11 +232,23 @@ struct sh7372_pm_domain sh7372_a3sp = {
 	.no_debug = true,
 };
 
+static void sh7372_a3sp_init(void)
+{
+	/* serial consoles make use of SCIF hardware located in A3SP,
+	 * keep such power domain on if "no_console_suspend" is set.
+	 */
+	sh7372_a3sp.stay_on = !console_suspend_enabled;
+}
+
 struct sh7372_pm_domain sh7372_a3sg = {
 	.bit_shift = 13,
 };
 
-#endif /* CONFIG_PM */
+#else /* !CONFIG_PM */
+
+static inline void sh7372_a3sp_init(void) {}
+
+#endif /* !CONFIG_PM */
 
 #if defined(CONFIG_SUSPEND) || defined(CONFIG_CPU_IDLE)
 static int sh7372_do_idle_core_standby(unsigned long unused)
@@ -470,10 +482,7 @@ void __init sh7372_pm_init(void)
 	/* do not convert A3SM, A3SP, A3SG, A4R power down into A4S */
 	__raw_writel(0, PDNSEL);
 
-	/* serial consoles make use of SCIF hardware located in A3SP,
-	 * keep such power domain on if "no_console_suspend" is set.
-	 */
-	sh7372_a3sp.stay_on = !console_suspend_enabled;
+	sh7372_a3sp_init();
 
 	sh7372_suspend_init();
 	sh7372_cpuidle_init();

  reply	other threads:[~2011-11-16 22:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-16 22:25 sh7372 compile breakage in current -next Rafael J. Wysocki
2011-11-16 22:42 ` Rafael J. Wysocki [this message]
2011-11-17 12:19 ` Guennadi Liakhovetski

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=201111162342.34184.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox