diff options
Diffstat (limited to 'arch/arm/mach-pxa/cm-x2xx.c')
-rw-r--r-- | arch/arm/mach-pxa/cm-x2xx.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/arch/arm/mach-pxa/cm-x2xx.c b/arch/arm/mach-pxa/cm-x2xx.c index 8225e2e58c6e..a10996782476 100644 --- a/arch/arm/mach-pxa/cm-x2xx.c +++ b/arch/arm/mach-pxa/cm-x2xx.c | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <linux/sysdev.h> | 13 | #include <linux/syscore_ops.h> |
14 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
15 | #include <linux/gpio.h> | 15 | #include <linux/gpio.h> |
16 | 16 | ||
@@ -388,7 +388,7 @@ static inline void cmx2xx_init_display(void) {} | |||
388 | #ifdef CONFIG_PM | 388 | #ifdef CONFIG_PM |
389 | static unsigned long sleep_save_msc[10]; | 389 | static unsigned long sleep_save_msc[10]; |
390 | 390 | ||
391 | static int cmx2xx_suspend(struct sys_device *dev, pm_message_t state) | 391 | static int cmx2xx_suspend(void) |
392 | { | 392 | { |
393 | cmx2xx_pci_suspend(); | 393 | cmx2xx_pci_suspend(); |
394 | 394 | ||
@@ -412,7 +412,7 @@ static int cmx2xx_suspend(struct sys_device *dev, pm_message_t state) | |||
412 | return 0; | 412 | return 0; |
413 | } | 413 | } |
414 | 414 | ||
415 | static int cmx2xx_resume(struct sys_device *dev) | 415 | static void cmx2xx_resume(void) |
416 | { | 416 | { |
417 | cmx2xx_pci_resume(); | 417 | cmx2xx_pci_resume(); |
418 | 418 | ||
@@ -420,27 +420,18 @@ static int cmx2xx_resume(struct sys_device *dev) | |||
420 | __raw_writel(sleep_save_msc[0], MSC0); | 420 | __raw_writel(sleep_save_msc[0], MSC0); |
421 | __raw_writel(sleep_save_msc[1], MSC1); | 421 | __raw_writel(sleep_save_msc[1], MSC1); |
422 | __raw_writel(sleep_save_msc[2], MSC2); | 422 | __raw_writel(sleep_save_msc[2], MSC2); |
423 | |||
424 | return 0; | ||
425 | } | 423 | } |
426 | 424 | ||
427 | static struct sysdev_class cmx2xx_pm_sysclass = { | 425 | static struct syscore_ops cmx2xx_pm_syscore_ops = { |
428 | .name = "pm", | ||
429 | .resume = cmx2xx_resume, | 426 | .resume = cmx2xx_resume, |
430 | .suspend = cmx2xx_suspend, | 427 | .suspend = cmx2xx_suspend, |
431 | }; | 428 | }; |
432 | 429 | ||
433 | static struct sys_device cmx2xx_pm_device = { | ||
434 | .cls = &cmx2xx_pm_sysclass, | ||
435 | }; | ||
436 | |||
437 | static int __init cmx2xx_pm_init(void) | 430 | static int __init cmx2xx_pm_init(void) |
438 | { | 431 | { |
439 | int error; | 432 | register_syscore_ops(&cmx2xx_pm_syscore_ops); |
440 | error = sysdev_class_register(&cmx2xx_pm_sysclass); | 433 | |
441 | if (error == 0) | 434 | return 0; |
442 | error = sysdev_register(&cmx2xx_pm_device); | ||
443 | return error; | ||
444 | } | 435 | } |
445 | #else | 436 | #else |
446 | static int __init cmx2xx_pm_init(void) { return 0; } | 437 | static int __init cmx2xx_pm_init(void) { return 0; } |