diff options
Diffstat (limited to 'arch/arm/mach-omap1/pm.c')
-rw-r--r-- | arch/arm/mach-omap1/pm.c | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index 089b8208de0e..3bf01e28df33 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c | |||
@@ -35,10 +35,9 @@ | |||
35 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 35 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
36 | */ | 36 | */ |
37 | 37 | ||
38 | #include <linux/pm.h> | 38 | #include <linux/suspend.h> |
39 | #include <linux/sched.h> | 39 | #include <linux/sched.h> |
40 | #include <linux/proc_fs.h> | 40 | #include <linux/proc_fs.h> |
41 | #include <linux/pm.h> | ||
42 | #include <linux/interrupt.h> | 41 | #include <linux/interrupt.h> |
43 | #include <linux/sysfs.h> | 42 | #include <linux/sysfs.h> |
44 | #include <linux/module.h> | 43 | #include <linux/module.h> |
@@ -600,27 +599,15 @@ static void (*saved_idle)(void) = NULL; | |||
600 | 599 | ||
601 | /* | 600 | /* |
602 | * omap_pm_prepare - Do preliminary suspend work. | 601 | * omap_pm_prepare - Do preliminary suspend work. |
603 | * @state: suspend state we're entering. | ||
604 | * | 602 | * |
605 | */ | 603 | */ |
606 | static int omap_pm_prepare(suspend_state_t state) | 604 | static int omap_pm_prepare(void) |
607 | { | 605 | { |
608 | int error = 0; | ||
609 | |||
610 | /* We cannot sleep in idle until we have resumed */ | 606 | /* We cannot sleep in idle until we have resumed */ |
611 | saved_idle = pm_idle; | 607 | saved_idle = pm_idle; |
612 | pm_idle = NULL; | 608 | pm_idle = NULL; |
613 | 609 | ||
614 | switch (state) | 610 | return 0; |
615 | { | ||
616 | case PM_SUSPEND_STANDBY: | ||
617 | case PM_SUSPEND_MEM: | ||
618 | break; | ||
619 | default: | ||
620 | return -EINVAL; | ||
621 | } | ||
622 | |||
623 | return error; | ||
624 | } | 611 | } |
625 | 612 | ||
626 | 613 | ||
@@ -648,16 +635,14 @@ static int omap_pm_enter(suspend_state_t state) | |||
648 | 635 | ||
649 | /** | 636 | /** |
650 | * omap_pm_finish - Finish up suspend sequence. | 637 | * omap_pm_finish - Finish up suspend sequence. |
651 | * @state: State we're coming out of. | ||
652 | * | 638 | * |
653 | * This is called after we wake back up (or if entering the sleep state | 639 | * This is called after we wake back up (or if entering the sleep state |
654 | * failed). | 640 | * failed). |
655 | */ | 641 | */ |
656 | 642 | ||
657 | static int omap_pm_finish(suspend_state_t state) | 643 | static void omap_pm_finish(void) |
658 | { | 644 | { |
659 | pm_idle = saved_idle; | 645 | pm_idle = saved_idle; |
660 | return 0; | ||
661 | } | 646 | } |
662 | 647 | ||
663 | 648 | ||
@@ -674,11 +659,11 @@ static struct irqaction omap_wakeup_irq = { | |||
674 | 659 | ||
675 | 660 | ||
676 | 661 | ||
677 | static struct pm_ops omap_pm_ops ={ | 662 | static struct platform_suspend_ops omap_pm_ops ={ |
678 | .prepare = omap_pm_prepare, | 663 | .prepare = omap_pm_prepare, |
679 | .enter = omap_pm_enter, | 664 | .enter = omap_pm_enter, |
680 | .finish = omap_pm_finish, | 665 | .finish = omap_pm_finish, |
681 | .valid = pm_valid_only_mem, | 666 | .valid = suspend_valid_only_mem, |
682 | }; | 667 | }; |
683 | 668 | ||
684 | static int __init omap_pm_init(void) | 669 | static int __init omap_pm_init(void) |
@@ -735,7 +720,7 @@ static int __init omap_pm_init(void) | |||
735 | else if (cpu_is_omap16xx()) | 720 | else if (cpu_is_omap16xx()) |
736 | omap_writel(OMAP1610_IDLECT3_VAL, OMAP1610_IDLECT3); | 721 | omap_writel(OMAP1610_IDLECT3_VAL, OMAP1610_IDLECT3); |
737 | 722 | ||
738 | pm_set_ops(&omap_pm_ops); | 723 | suspend_set_ops(&omap_pm_ops); |
739 | 724 | ||
740 | #if defined(DEBUG) && defined(CONFIG_PROC_FS) | 725 | #if defined(DEBUG) && defined(CONFIG_PROC_FS) |
741 | omap_pm_init_proc(); | 726 | omap_pm_init_proc(); |