mtd: nand: lpc32xx_slc: fix potential overflow over 4 bits
[linux-2.6/btrfs-unstable.git] / arch / arm / mach-shmobile / suspend.c
blob5d92b5dd486b0b9fd8d501aa3b69f56f96ae1ee2
1 /*
2 * Suspend-to-RAM support code for SH-Mobile ARM
4 * Copyright (C) 2011 Magnus Damm
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
11 #include <linux/pm.h>
12 #include <linux/suspend.h>
13 #include <linux/module.h>
14 #include <linux/err.h>
15 #include <linux/cpu.h>
17 #include <asm/io.h>
18 #include <asm/system_misc.h>
20 static int shmobile_suspend_default_enter(suspend_state_t suspend_state)
22 cpu_do_idle();
23 return 0;
26 static int shmobile_suspend_begin(suspend_state_t state)
28 cpu_idle_poll_ctrl(true);
29 return 0;
32 static void shmobile_suspend_end(void)
34 cpu_idle_poll_ctrl(false);
37 struct platform_suspend_ops shmobile_suspend_ops = {
38 .begin = shmobile_suspend_begin,
39 .end = shmobile_suspend_end,
40 .enter = shmobile_suspend_default_enter,
41 .valid = suspend_valid_only_mem,
44 int __init shmobile_suspend_init(void)
46 suspend_set_ops(&shmobile_suspend_ops);
47 return 0;