diff options
Diffstat (limited to 'arch/arm/mach-pxa/clock-pxa2xx.c')
-rw-r--r-- | arch/arm/mach-pxa/clock-pxa2xx.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/arch/arm/mach-pxa/clock-pxa2xx.c b/arch/arm/mach-pxa/clock-pxa2xx.c index 1ce090448493..1d5859d9a0e3 100644 --- a/arch/arm/mach-pxa/clock-pxa2xx.c +++ b/arch/arm/mach-pxa/clock-pxa2xx.c | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/sysdev.h> | 12 | #include <linux/syscore_ops.h> |
13 | 13 | ||
14 | #include <mach/pxa2xx-regs.h> | 14 | #include <mach/pxa2xx-regs.h> |
15 | 15 | ||
@@ -33,32 +33,22 @@ const struct clkops clk_pxa2xx_cken_ops = { | |||
33 | #ifdef CONFIG_PM | 33 | #ifdef CONFIG_PM |
34 | static uint32_t saved_cken; | 34 | static uint32_t saved_cken; |
35 | 35 | ||
36 | static int pxa2xx_clock_suspend(struct sys_device *d, pm_message_t state) | 36 | static int pxa2xx_clock_suspend(void) |
37 | { | 37 | { |
38 | saved_cken = CKEN; | 38 | saved_cken = CKEN; |
39 | return 0; | 39 | return 0; |
40 | } | 40 | } |
41 | 41 | ||
42 | static int pxa2xx_clock_resume(struct sys_device *d) | 42 | static void pxa2xx_clock_resume(void) |
43 | { | 43 | { |
44 | CKEN = saved_cken; | 44 | CKEN = saved_cken; |
45 | return 0; | ||
46 | } | 45 | } |
47 | #else | 46 | #else |
48 | #define pxa2xx_clock_suspend NULL | 47 | #define pxa2xx_clock_suspend NULL |
49 | #define pxa2xx_clock_resume NULL | 48 | #define pxa2xx_clock_resume NULL |
50 | #endif | 49 | #endif |
51 | 50 | ||
52 | struct sysdev_class pxa2xx_clock_sysclass = { | 51 | struct syscore_ops pxa2xx_clock_syscore_ops = { |
53 | .name = "pxa2xx-clock", | ||
54 | .suspend = pxa2xx_clock_suspend, | 52 | .suspend = pxa2xx_clock_suspend, |
55 | .resume = pxa2xx_clock_resume, | 53 | .resume = pxa2xx_clock_resume, |
56 | }; | 54 | }; |
57 | |||
58 | static int __init pxa2xx_clock_init(void) | ||
59 | { | ||
60 | if (cpu_is_pxa2xx()) | ||
61 | return sysdev_class_register(&pxa2xx_clock_sysclass); | ||
62 | return 0; | ||
63 | } | ||
64 | postcore_initcall(pxa2xx_clock_init); | ||