diff options
Diffstat (limited to 'arch/arm/mach-pxa/lpd270.c')
-rw-r--r-- | arch/arm/mach-pxa/lpd270.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c index f5de541725b1..6cf8180bf5bd 100644 --- a/arch/arm/mach-pxa/lpd270.c +++ b/arch/arm/mach-pxa/lpd270.c | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/sysdev.h> | 18 | #include <linux/syscore_ops.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/bitops.h> | 21 | #include <linux/bitops.h> |
@@ -159,30 +159,22 @@ static void __init lpd270_init_irq(void) | |||
159 | 159 | ||
160 | 160 | ||
161 | #ifdef CONFIG_PM | 161 | #ifdef CONFIG_PM |
162 | static int lpd270_irq_resume(struct sys_device *dev) | 162 | static void lpd270_irq_resume(void) |
163 | { | 163 | { |
164 | __raw_writew(lpd270_irq_enabled, LPD270_INT_MASK); | 164 | __raw_writew(lpd270_irq_enabled, LPD270_INT_MASK); |
165 | return 0; | ||
166 | } | 165 | } |
167 | 166 | ||
168 | static struct sysdev_class lpd270_irq_sysclass = { | 167 | static struct syscore_ops lpd270_irq_syscore_ops = { |
169 | .name = "cpld_irq", | ||
170 | .resume = lpd270_irq_resume, | 168 | .resume = lpd270_irq_resume, |
171 | }; | 169 | }; |
172 | 170 | ||
173 | static struct sys_device lpd270_irq_device = { | ||
174 | .cls = &lpd270_irq_sysclass, | ||
175 | }; | ||
176 | |||
177 | static int __init lpd270_irq_device_init(void) | 171 | static int __init lpd270_irq_device_init(void) |
178 | { | 172 | { |
179 | int ret = -ENODEV; | ||
180 | if (machine_is_logicpd_pxa270()) { | 173 | if (machine_is_logicpd_pxa270()) { |
181 | ret = sysdev_class_register(&lpd270_irq_sysclass); | 174 | register_syscore_ops(&lpd270_irq_syscore_ops); |
182 | if (ret == 0) | 175 | return 0; |
183 | ret = sysdev_register(&lpd270_irq_device); | ||
184 | } | 176 | } |
185 | return ret; | 177 | return -ENODEV; |
186 | } | 178 | } |
187 | 179 | ||
188 | device_initcall(lpd270_irq_device_init); | 180 | device_initcall(lpd270_irq_device_init); |