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/mainstone.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/mainstone.c')
-rw-r--r-- | arch/arm/mach-pxa/mainstone.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index 95163baca29e..3479e2b3b511 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.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> |
@@ -185,31 +185,21 @@ static void __init mainstone_init_irq(void) | |||
185 | 185 | ||
186 | #ifdef CONFIG_PM | 186 | #ifdef CONFIG_PM |
187 | 187 | ||
188 | static int mainstone_irq_resume(struct sys_device *dev) | 188 | static void mainstone_irq_resume(void) |
189 | { | 189 | { |
190 | MST_INTMSKENA = mainstone_irq_enabled; | 190 | MST_INTMSKENA = mainstone_irq_enabled; |
191 | return 0; | ||
192 | } | 191 | } |
193 | 192 | ||
194 | static struct sysdev_class mainstone_irq_sysclass = { | 193 | static struct syscore_ops mainstone_irq_syscore_ops = { |
195 | .name = "cpld_irq", | ||
196 | .resume = mainstone_irq_resume, | 194 | .resume = mainstone_irq_resume, |
197 | }; | 195 | }; |
198 | 196 | ||
199 | static struct sys_device mainstone_irq_device = { | ||
200 | .cls = &mainstone_irq_sysclass, | ||
201 | }; | ||
202 | |||
203 | static int __init mainstone_irq_device_init(void) | 197 | static int __init mainstone_irq_device_init(void) |
204 | { | 198 | { |
205 | int ret = -ENODEV; | 199 | if (machine_is_mainstone()) |
200 | register_syscore_ops(&mainstone_irq_syscore_ops); | ||
206 | 201 | ||
207 | if (machine_is_mainstone()) { | 202 | return 0; |
208 | ret = sysdev_class_register(&mainstone_irq_sysclass); | ||
209 | if (ret == 0) | ||
210 | ret = sysdev_register(&mainstone_irq_device); | ||
211 | } | ||
212 | return ret; | ||
213 | } | 203 | } |
214 | 204 | ||
215 | device_initcall(mainstone_irq_device_init); | 205 | device_initcall(mainstone_irq_device_init); |