diff options
Diffstat (limited to 'arch/unicore32/kernel/irq.c')
-rw-r--r-- | arch/unicore32/kernel/irq.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/arch/unicore32/kernel/irq.c b/arch/unicore32/kernel/irq.c index 2aa30a364bbe..d4efa7d679ff 100644 --- a/arch/unicore32/kernel/irq.c +++ b/arch/unicore32/kernel/irq.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/list.h> | 23 | #include <linux/list.h> |
24 | #include <linux/kallsyms.h> | 24 | #include <linux/kallsyms.h> |
25 | #include <linux/proc_fs.h> | 25 | #include <linux/proc_fs.h> |
26 | #include <linux/sysdev.h> | 26 | #include <linux/syscore_ops.h> |
27 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
28 | 28 | ||
29 | #include <asm/system.h> | 29 | #include <asm/system.h> |
@@ -237,7 +237,7 @@ static struct puv3_irq_state { | |||
237 | unsigned int iccr; | 237 | unsigned int iccr; |
238 | } puv3_irq_state; | 238 | } puv3_irq_state; |
239 | 239 | ||
240 | static int puv3_irq_suspend(struct sys_device *dev, pm_message_t state) | 240 | static int puv3_irq_suspend(void) |
241 | { | 241 | { |
242 | struct puv3_irq_state *st = &puv3_irq_state; | 242 | struct puv3_irq_state *st = &puv3_irq_state; |
243 | 243 | ||
@@ -265,7 +265,7 @@ static int puv3_irq_suspend(struct sys_device *dev, pm_message_t state) | |||
265 | return 0; | 265 | return 0; |
266 | } | 266 | } |
267 | 267 | ||
268 | static int puv3_irq_resume(struct sys_device *dev) | 268 | static void puv3_irq_resume(void) |
269 | { | 269 | { |
270 | struct puv3_irq_state *st = &puv3_irq_state; | 270 | struct puv3_irq_state *st = &puv3_irq_state; |
271 | 271 | ||
@@ -278,27 +278,20 @@ static int puv3_irq_resume(struct sys_device *dev) | |||
278 | 278 | ||
279 | writel(st->icmr, INTC_ICMR); | 279 | writel(st->icmr, INTC_ICMR); |
280 | } | 280 | } |
281 | return 0; | ||
282 | } | 281 | } |
283 | 282 | ||
284 | static struct sysdev_class puv3_irq_sysclass = { | 283 | static struct syscore_ops puv3_irq_syscore_ops = { |
285 | .name = "pkunity-irq", | ||
286 | .suspend = puv3_irq_suspend, | 284 | .suspend = puv3_irq_suspend, |
287 | .resume = puv3_irq_resume, | 285 | .resume = puv3_irq_resume, |
288 | }; | 286 | }; |
289 | 287 | ||
290 | static struct sys_device puv3_irq_device = { | 288 | static int __init puv3_irq_init_syscore(void) |
291 | .id = 0, | ||
292 | .cls = &puv3_irq_sysclass, | ||
293 | }; | ||
294 | |||
295 | static int __init puv3_irq_init_devicefs(void) | ||
296 | { | 289 | { |
297 | sysdev_class_register(&puv3_irq_sysclass); | 290 | register_syscore_ops(&puv3_irq_syscore_ops); |
298 | return sysdev_register(&puv3_irq_device); | 291 | return 0; |
299 | } | 292 | } |
300 | 293 | ||
301 | device_initcall(puv3_irq_init_devicefs); | 294 | device_initcall(puv3_irq_init_syscore); |
302 | 295 | ||
303 | void __init init_IRQ(void) | 296 | void __init init_IRQ(void) |
304 | { | 297 | { |