Skip to content

Commit

Permalink
ARM: mxs: call mxs_pm_init() as a machine_desc hook
Browse files Browse the repository at this point in the history
The device_initcall is not a friend of multiplatform build.  Call
mxs_pm_init() as a machine_desc hook instead of device_initcall.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
  • Loading branch information
Shawn Guo committed Apr 4, 2013
1 parent e933a1a commit 4568099
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
3 changes: 3 additions & 0 deletions arch/arm/mach-mxs/mach-mxs.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include <asm/mach/time.h>
#include <asm/system_misc.h>

#include "pm.h"

/* MXS DIGCTL SAIF CLKMUX */
#define MXS_DIGCTL_SAIF_CLKMUX_DIRECT 0x0
#define MXS_DIGCTL_SAIF_CLKMUX_CROSSINPUT 0x1
Expand Down Expand Up @@ -607,6 +609,7 @@ DT_MACHINE_START(MXS, "Freescale MXS (Device Tree)")
.handle_irq = icoll_handle_irq,
.init_time = mxs_timer_init,
.init_machine = mxs_machine_init,
.init_late = mxs_pm_init,
.dt_compat = mxs_dt_compat,
.restart = mxs_restart,
MACHINE_END
4 changes: 1 addition & 3 deletions arch/arm/mach-mxs/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ static struct platform_suspend_ops mxs_suspend_ops = {
.valid = suspend_valid_only_mem,
};

static int __init mxs_pm_init(void)
void __init mxs_pm_init(void)
{
suspend_set_ops(&mxs_suspend_ops);
return 0;
}
device_initcall(mxs_pm_init);
14 changes: 14 additions & 0 deletions arch/arm/mach-mxs/pm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright (C) 2013 Freescale Semiconductor, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef __ARCH_MXS_PM_H
#define __ARCH_MXS_PM_H

void mxs_pm_init(void);

#endif

0 comments on commit 4568099

Please sign in to comment.