aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-pxa/generic.h1
-rw-r--r--arch/arm/mach-pxa/mfp-pxa3xx.c20
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c2
3 files changed, 13 insertions, 10 deletions
diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h
index bd2a2356d97..8bca89c4a25 100644
--- a/arch/arm/mach-pxa/generic.h
+++ b/arch/arm/mach-pxa/generic.h
@@ -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;
diff --git a/arch/arm/mach-pxa/mfp-pxa3xx.c b/arch/arm/mach-pxa/mfp-pxa3xx.c
index f5809adce29..b84c3ba7a8d 100644
--- a/arch/arm/mach-pxa/mfp-pxa3xx.c
+++ b/arch/arm/mach-pxa/mfp-pxa3xx.c
@@ -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);
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index eedcec0bf3f..85b1df3f69c 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -532,6 +532,8 @@ static struct sys_device pxa3xx_sysdev[] = {
{
.cls = &pxa_irq_sysclass,
}, {
+ .cls = &pxa3xx_mfp_sysclass,
+ }, {
.cls = &pxa_gpio_sysclass,
},
};