aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/pxa27x.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2011-04-22 16:03:11 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2011-04-24 13:16:09 -0400
commit2eaa03b5bebd1e80014f780d7bf27c3e66daefd6 (patch)
tree9366c07d166eaede876cd7233cc30056f198a93f /arch/arm/mach-pxa/pxa27x.c
parent905339807bde7bb726001b69fbdf69ab0cf69a9e (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/pxa27x.c')
-rw-r--r--arch/arm/mach-pxa/pxa27x.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index 909756eaf4b7..2fecbec58d88 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -16,7 +16,7 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/suspend.h> 17#include <linux/suspend.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/sysdev.h> 19#include <linux/syscore_ops.h>
20#include <linux/io.h> 20#include <linux/io.h>
21#include <linux/irq.h> 21#include <linux/irq.h>
22#include <linux/i2c/pxa-i2c.h> 22#include <linux/i2c/pxa-i2c.h>
@@ -428,21 +428,9 @@ static struct platform_device *devices[] __initdata = {
428 &pxa27x_device_pwm1, 428 &pxa27x_device_pwm1,
429}; 429};
430 430
431static struct sys_device pxa27x_sysdev[] = {
432 {
433 .cls = &pxa_irq_sysclass,
434 }, {
435 .cls = &pxa2xx_mfp_sysclass,
436 }, {
437 .cls = &pxa_gpio_sysclass,
438 }, {
439 .cls = &pxa2xx_clock_sysclass,
440 }
441};
442
443static int __init pxa27x_init(void) 431static int __init pxa27x_init(void)
444{ 432{
445 int i, ret = 0; 433 int ret = 0;
446 434
447 if (cpu_is_pxa27x()) { 435 if (cpu_is_pxa27x()) {
448 436
@@ -455,11 +443,10 @@ static int __init pxa27x_init(void)
455 443
456 pxa27x_init_pm(); 444 pxa27x_init_pm();
457 445
458 for (i = 0; i < ARRAY_SIZE(pxa27x_sysdev); i++) { 446 register_syscore_ops(&pxa_irq_syscore_ops);
459 ret = sysdev_register(&pxa27x_sysdev[i]); 447 register_syscore_ops(&pxa2xx_mfp_syscore_ops);
460 if (ret) 448 register_syscore_ops(&pxa_gpio_syscore_ops);
461 pr_err("failed to register sysdev[%d]\n", i); 449 register_syscore_ops(&pxa2xx_clock_syscore_ops);
462 }
463 450
464 ret = platform_add_devices(devices, ARRAY_SIZE(devices)); 451 ret = platform_add_devices(devices, ARRAY_SIZE(devices));
465 } 452 }