diff options
Diffstat (limited to 'arch/arm/mach-s3c2412/pm.c')
-rw-r--r-- | arch/arm/mach-s3c2412/pm.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/arch/arm/mach-s3c2412/pm.c b/arch/arm/mach-s3c2412/pm.c index a7417c479ffe..752b13a7b3db 100644 --- a/arch/arm/mach-s3c2412/pm.c +++ b/arch/arm/mach-s3c2412/pm.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/sysdev.h> | 19 | #include <linux/sysdev.h> |
20 | #include <linux/syscore_ops.h> | ||
20 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
21 | #include <linux/io.h> | 22 | #include <linux/io.h> |
22 | 23 | ||
@@ -86,13 +87,24 @@ static struct sleep_save s3c2412_sleep[] = { | |||
86 | SAVE_ITEM(S3C2413_GPJSLPCON), | 87 | SAVE_ITEM(S3C2413_GPJSLPCON), |
87 | }; | 88 | }; |
88 | 89 | ||
89 | static int s3c2412_pm_suspend(struct sys_device *dev, pm_message_t state) | 90 | static struct sysdev_driver s3c2412_pm_driver = { |
91 | .add = s3c2412_pm_add, | ||
92 | }; | ||
93 | |||
94 | static __init int s3c2412_pm_init(void) | ||
95 | { | ||
96 | return sysdev_driver_register(&s3c2412_sysclass, &s3c2412_pm_driver); | ||
97 | } | ||
98 | |||
99 | arch_initcall(s3c2412_pm_init); | ||
100 | |||
101 | static int s3c2412_pm_suspend(void) | ||
90 | { | 102 | { |
91 | s3c_pm_do_save(s3c2412_sleep, ARRAY_SIZE(s3c2412_sleep)); | 103 | s3c_pm_do_save(s3c2412_sleep, ARRAY_SIZE(s3c2412_sleep)); |
92 | return 0; | 104 | return 0; |
93 | } | 105 | } |
94 | 106 | ||
95 | static int s3c2412_pm_resume(struct sys_device *dev) | 107 | static void s3c2412_pm_resume(void) |
96 | { | 108 | { |
97 | unsigned long tmp; | 109 | unsigned long tmp; |
98 | 110 | ||
@@ -102,18 +114,9 @@ static int s3c2412_pm_resume(struct sys_device *dev) | |||
102 | __raw_writel(tmp, S3C2412_PWRCFG); | 114 | __raw_writel(tmp, S3C2412_PWRCFG); |
103 | 115 | ||
104 | s3c_pm_do_restore(s3c2412_sleep, ARRAY_SIZE(s3c2412_sleep)); | 116 | s3c_pm_do_restore(s3c2412_sleep, ARRAY_SIZE(s3c2412_sleep)); |
105 | return 0; | ||
106 | } | 117 | } |
107 | 118 | ||
108 | static struct sysdev_driver s3c2412_pm_driver = { | 119 | struct syscore_ops s3c2412_pm_syscore_ops = { |
109 | .add = s3c2412_pm_add, | ||
110 | .suspend = s3c2412_pm_suspend, | 120 | .suspend = s3c2412_pm_suspend, |
111 | .resume = s3c2412_pm_resume, | 121 | .resume = s3c2412_pm_resume, |
112 | }; | 122 | }; |
113 | |||
114 | static __init int s3c2412_pm_init(void) | ||
115 | { | ||
116 | return sysdev_driver_register(&s3c2412_sysclass, &s3c2412_pm_driver); | ||
117 | } | ||
118 | |||
119 | arch_initcall(s3c2412_pm_init); | ||