[ARM] pxa: move mfp sysdev registeration out for suspend/resume order
authoreric miao <eric.miao@marvell.com>
Mon, 4 Feb 2008 02:07:09 +0000 (10:07 +0800)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 19 Apr 2008 10:29:04 +0000 (11:29 +0100)
MFP configurations after resume should be done before the GPIO registers
are restored.  Move the mfp sysdev registeration to the same place where
GPIO and IRQ sysdev(s) are registered to better control the order.

Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-pxa/generic.h
arch/arm/mach-pxa/mfp-pxa3xx.c
arch/arm/mach-pxa/pxa3xx.c

index bd2a2356d9767e2228f3df9b5e516723e1838f46..8bca89c4a256a548ef44ba0e7486abe652264833 100644 (file)
@@ -55,3 +55,4 @@ extern unsigned pxa3xx_get_memclk_frequency_10khz(void);
 
 extern struct sysdev_class pxa_irq_sysclass;
 extern struct sysdev_class pxa_gpio_sysclass;
+extern struct sysdev_class pxa3xx_mfp_sysclass;
index f5809adce298219a46f077d7234dd0a99cf952e3..b84c3ba7a8d62846cbb698f39caaad5651d80fbc 100644 (file)
@@ -234,22 +234,22 @@ static int pxa3xx_mfp_resume(struct sys_device *d)
 
        return 0;
 }
+#else
+#define pxa3xx_mfp_suspend     NULL
+#define pxa3xx_mfp_resume      NULL
+#endif
 
-static struct sysdev_class mfp_sysclass = {
+struct sysdev_class pxa3xx_mfp_sysclass = {
        .name           = "mfp",
        .suspend        = pxa3xx_mfp_suspend,
        .resume         = pxa3xx_mfp_resume,
 };
 
-static struct sys_device mfp_device = {
-       .id             = 0,
-       .cls            = &mfp_sysclass,
-};
-
 static int __init mfp_init_devicefs(void)
 {
-       sysdev_class_register(&mfp_sysclass);
-       return sysdev_register(&mfp_device);
+       if (cpu_is_pxa3xx())
+               return sysdev_class_register(&pxa3xx_mfp_sysclass);
+
+       return 0;
 }
-device_initcall(mfp_init_devicefs);
-#endif
+postcore_initcall(mfp_init_devicefs);
index eedcec0bf3f0ac0e2d447fb4449bf7907e7fb327..85b1df3f69c9b3744763001c20660aa522f2c6df 100644 (file)
@@ -531,6 +531,8 @@ static struct platform_device *devices[] __initdata = {
 static struct sys_device pxa3xx_sysdev[] = {
        {
                .cls    = &pxa_irq_sysclass,
+       }, {
+               .cls    = &pxa3xx_mfp_sysclass,
        }, {
                .cls    = &pxa_gpio_sysclass,
        },
This page took 0.026519 seconds and 5 git commands to generate.