diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2007-12-10 08:33:06 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-01-26 10:07:52 -0500 |
commit | 16f159b1fc4f227a25cc4792e3804353e4777ebe (patch) | |
tree | 178728a7e1a293eb2b8346c700e5004e520f8228 /arch | |
parent | 2f1a74e5a2de0459139b85af95e901448726c375 (diff) |
[ARM] pxa: only register "cpld_irq" for the correct platform
Only register the "cpld_irq" sysclass for mainstone/lubbock if we're
running on one of those platforms.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-pxa/lubbock.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-pxa/mainstone.c | 10 |
2 files changed, 14 insertions, 6 deletions
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index ebb73f133486..1b9290c0ed5e 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c | |||
@@ -136,9 +136,13 @@ static struct sys_device lubbock_irq_device = { | |||
136 | 136 | ||
137 | static int __init lubbock_irq_device_init(void) | 137 | static int __init lubbock_irq_device_init(void) |
138 | { | 138 | { |
139 | int ret = sysdev_class_register(&lubbock_irq_sysclass); | 139 | int ret = -ENODEV; |
140 | if (ret == 0) | 140 | |
141 | ret = sysdev_register(&lubbock_irq_device); | 141 | if (machine_is_lubbock()) { |
142 | ret = sysdev_class_register(&lubbock_irq_sysclass); | ||
143 | if (ret == 0) | ||
144 | ret = sysdev_register(&lubbock_irq_device); | ||
145 | } | ||
142 | return ret; | 146 | return ret; |
143 | } | 147 | } |
144 | 148 | ||
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index a5db00c38f1f..237459bf67c6 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
@@ -131,9 +131,13 @@ static struct sys_device mainstone_irq_device = { | |||
131 | 131 | ||
132 | static int __init mainstone_irq_device_init(void) | 132 | static int __init mainstone_irq_device_init(void) |
133 | { | 133 | { |
134 | int ret = sysdev_class_register(&mainstone_irq_sysclass); | 134 | int ret = -ENODEV; |
135 | if (ret == 0) | 135 | |
136 | ret = sysdev_register(&mainstone_irq_device); | 136 | if (machine_is_mainstone()) { |
137 | ret = sysdev_class_register(&mainstone_irq_sysclass); | ||
138 | if (ret == 0) | ||
139 | ret = sysdev_register(&mainstone_irq_device); | ||
140 | } | ||
137 | return ret; | 141 | return ret; |
138 | } | 142 | } |
139 | 143 | ||