linux/arch/arm/mach-tango/pm.c
Florian Fainelli 64fc2a947a ARM: 8641/1: treewide: Replace uses of virt_to_phys with __pa_symbol
All low-level PM/SMP code using virt_to_phys() should actually use
__pa_symbol() against kernel symbols. Update code where relevant to move
away from virt_to_phys().

Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2017-02-28 11:06:10 +00:00

33 lines
621 B
C

#include <linux/init.h>
#include <linux/suspend.h>
#include <asm/suspend.h>
#include "smc.h"
static int tango_pm_powerdown(unsigned long arg)
{
tango_suspend(__pa_symbol(cpu_resume));
return -EIO; /* tango_suspend has failed */
}
static int tango_pm_enter(suspend_state_t state)
{
if (state == PM_SUSPEND_MEM)
return cpu_suspend(0, tango_pm_powerdown);
return -EINVAL;
}
static const struct platform_suspend_ops tango_pm_ops = {
.enter = tango_pm_enter,
.valid = suspend_valid_only_mem,
};
static int __init tango_pm_init(void)
{
suspend_set_ops(&tango_pm_ops);
return 0;
}
late_initcall(tango_pm_init);