]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] pxa: only register "cpld_irq" for the correct platform
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Mon, 10 Dec 2007 13:33:06 +0000 (13:33 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 26 Jan 2008 15:07:52 +0000 (15:07 +0000)
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>
arch/arm/mach-pxa/lubbock.c
arch/arm/mach-pxa/mainstone.c

index ebb73f1334861e112dc28f1fddfff6b0a52d0007..1b9290c0ed5e7c57b1e595f29dad073e753cc328 100644 (file)
@@ -136,9 +136,13 @@ static struct sys_device lubbock_irq_device = {
 
 static int __init lubbock_irq_device_init(void)
 {
-       int ret = sysdev_class_register(&lubbock_irq_sysclass);
-       if (ret == 0)
-               ret = sysdev_register(&lubbock_irq_device);
+       int ret = -ENODEV;
+
+       if (machine_is_lubbock()) {
+               ret = sysdev_class_register(&lubbock_irq_sysclass);
+               if (ret == 0)
+                       ret = sysdev_register(&lubbock_irq_device);
+       }
        return ret;
 }
 
index a5db00c38f1f309fc315e2d2603e35a9bad14b82..237459bf67c62535d89236eb5104d9732534fba5 100644 (file)
@@ -131,9 +131,13 @@ static struct sys_device mainstone_irq_device = {
 
 static int __init mainstone_irq_device_init(void)
 {
-       int ret = sysdev_class_register(&mainstone_irq_sysclass);
-       if (ret == 0)
-               ret = sysdev_register(&mainstone_irq_device);
+       int ret = -ENODEV;
+
+       if (machine_is_mainstone()) {
+               ret = sysdev_class_register(&mainstone_irq_sysclass);
+               if (ret == 0)
+                       ret = sysdev_register(&mainstone_irq_device);
+       }
        return ret;
 }