diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-04-22 16:03:11 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-04-24 13:16:09 -0400 |
commit | 2eaa03b5bebd1e80014f780d7bf27c3e66daefd6 (patch) | |
tree | 9366c07d166eaede876cd7233cc30056f198a93f /arch/arm/mach-pxa/viper.c | |
parent | 905339807bde7bb726001b69fbdf69ab0cf69a9e (diff) |
ARM / PXA: Use struct syscore_ops for "core" power management
Replace sysdev classes and struct sys_device objects used for "core"
power management by the PXA platform code with struct syscore_ops
objects that are simpler.
This reduces the code size and the kernel memory footprint. It also
is necessary for removing sysdevs entirely from the kernel in the
future.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/arm/mach-pxa/viper.c')
-rw-r--r-- | arch/arm/mach-pxa/viper.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index b523f119e0f0..903218eab56d 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/mtd/mtd.h> | 44 | #include <linux/mtd/mtd.h> |
45 | #include <linux/mtd/partitions.h> | 45 | #include <linux/mtd/partitions.h> |
46 | #include <linux/mtd/physmap.h> | 46 | #include <linux/mtd/physmap.h> |
47 | #include <linux/syscore_ops.h> | ||
47 | 48 | ||
48 | #include <mach/pxa25x.h> | 49 | #include <mach/pxa25x.h> |
49 | #include <mach/audio.h> | 50 | #include <mach/audio.h> |
@@ -130,20 +131,19 @@ static u8 viper_hw_version(void) | |||
130 | return v1; | 131 | return v1; |
131 | } | 132 | } |
132 | 133 | ||
133 | /* CPU sysdev */ | 134 | /* CPU system core operations. */ |
134 | static int viper_cpu_suspend(struct sys_device *sysdev, pm_message_t state) | 135 | static int viper_cpu_suspend(void) |
135 | { | 136 | { |
136 | viper_icr_set_bit(VIPER_ICR_R_DIS); | 137 | viper_icr_set_bit(VIPER_ICR_R_DIS); |
137 | return 0; | 138 | return 0; |
138 | } | 139 | } |
139 | 140 | ||
140 | static int viper_cpu_resume(struct sys_device *sysdev) | 141 | static void viper_cpu_resume(void) |
141 | { | 142 | { |
142 | viper_icr_clear_bit(VIPER_ICR_R_DIS); | 143 | viper_icr_clear_bit(VIPER_ICR_R_DIS); |
143 | return 0; | ||
144 | } | 144 | } |
145 | 145 | ||
146 | static struct sysdev_driver viper_cpu_sysdev_driver = { | 146 | static struct syscore_ops viper_cpu_syscore_ops = { |
147 | .suspend = viper_cpu_suspend, | 147 | .suspend = viper_cpu_suspend, |
148 | .resume = viper_cpu_resume, | 148 | .resume = viper_cpu_resume, |
149 | }; | 149 | }; |
@@ -945,7 +945,7 @@ static void __init viper_init(void) | |||
945 | viper_init_vcore_gpios(); | 945 | viper_init_vcore_gpios(); |
946 | viper_init_cpufreq(); | 946 | viper_init_cpufreq(); |
947 | 947 | ||
948 | sysdev_driver_register(&cpu_sysdev_class, &viper_cpu_sysdev_driver); | 948 | register_syscore_ops(&viper_cpu_syscore_ops); |
949 | 949 | ||
950 | if (version) { | 950 | if (version) { |
951 | pr_info("viper: hardware v%di%d detected. " | 951 | pr_info("viper: hardware v%di%d detected. " |