linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: highbank: call highbank_pm_init in .init_late hook
Date: Sun, 16 Sep 2012 22:13:07 -0500	[thread overview]
Message-ID: <50569543.1030300@gmail.com> (raw)
In-Reply-To: <1347850216-1979-1-git-send-email-shawn.guo@linaro.org>

On 09/16/2012 09:50 PM, Shawn Guo wrote:
> Being a module_init call, highbank_pm_init will cause problem with
> multi-platform build running on other platforms.  Call it in the
> .init_late hook instead.

I don't think this needs to be init_late that I recall, so
highbank_pm_init can just be called from highbank_init. I can update it.

I've scanned all the other platforms converted and it looks like I'm the
only problem. :)

Rob

> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>  arch/arm/mach-highbank/core.h     |    5 +++++
>  arch/arm/mach-highbank/highbank.c |    6 ++++++
>  arch/arm/mach-highbank/pm.c       |    4 +---
>  3 files changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h
> index 598ee78..c2e2c46 100644
> --- a/arch/arm/mach-highbank/core.h
> +++ b/arch/arm/mach-highbank/core.h
> @@ -10,5 +10,10 @@ static inline void highbank_lluart_map_io(void) {}
>  
>  extern void highbank_smc1(int fn, int arg);
>  extern void highbank_cpu_die(unsigned int cpu);
> +#ifdef CONFIG_PM
> +extern void highbank_pm_init(void);
> +#else
> +static inline void highbank_pm_init(void) {}
> +#endif
>  
>  extern struct smp_operations highbank_smp_ops;
> diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
> index 709bd72..8b1c5ba 100644
> --- a/arch/arm/mach-highbank/highbank.c
> +++ b/arch/arm/mach-highbank/highbank.c
> @@ -156,6 +156,11 @@ static void __init highbank_init(void)
>  	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
>  }
>  
> +static void __init highbank_init_late(void)
> +{
> +	highbank_pm_init();
> +}
> +
>  static const char *highbank_match[] __initconst = {
>  	"calxeda,highbank",
>  	NULL,
> @@ -168,6 +173,7 @@ DT_MACHINE_START(HIGHBANK, "Highbank")
>  	.timer		= &highbank_timer,
>  	.handle_irq	= gic_handle_irq,
>  	.init_machine	= highbank_init,
> +	.init_late	= highbank_init_late,
>  	.dt_compat	= highbank_match,
>  	.restart	= highbank_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-highbank/pm.c b/arch/arm/mach-highbank/pm.c
> index 33b3beb..de866f2 100644
> --- a/arch/arm/mach-highbank/pm.c
> +++ b/arch/arm/mach-highbank/pm.c
> @@ -47,9 +47,7 @@ static const struct platform_suspend_ops highbank_pm_ops = {
>  	.valid = suspend_valid_only_mem,
>  };
>  
> -static int __init highbank_pm_init(void)
> +void __init highbank_pm_init(void)
>  {
>  	suspend_set_ops(&highbank_pm_ops);
> -	return 0;
>  }
> -module_init(highbank_pm_init);
> 

      reply	other threads:[~2012-09-17  3:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-17  2:50 [PATCH] ARM: highbank: call highbank_pm_init in .init_late hook Shawn Guo
2012-09-17  3:13 ` Rob Herring [this message]

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=50569543.1030300@gmail.com \
    --to=robherring2@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).