]> err.no Git - linux-2.6/commitdiff
[ARM] 5073/1: spitz_pm: don't register devices on non-spitz machines
authorDmitry Baryshkov <dbaryshkov@gmail.com>
Sat, 31 May 2008 15:17:32 +0000 (16:17 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 2 Jun 2008 18:33:34 +0000 (19:33 +0100)
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-pxa/spitz_pm.c

index 48396f4eb265676d4add10b3f78d91470cff5b56..360354084ae40dbb6662436a61c5bc35a94ebeb1 100644 (file)
@@ -26,6 +26,7 @@
 #include <asm/arch/sharpsl.h>
 #include <asm/arch/spitz.h>
 #include <asm/arch/pxa-regs.h>
+#include <asm/arch/pxa2xx-regs.h>
 #include <asm/arch/pxa2xx-gpio.h>
 #include "sharpsl.h"
 
@@ -231,6 +232,10 @@ static int __devinit spitzpm_init(void)
 {
        int ret;
 
+       if (!machine_is_spitz() && !machine_is_akita()
+                       && !machine_is_borzoi())
+               return -ENODEV;
+
        spitzpm_device = platform_device_alloc("sharpsl-pm", -1);
        if (!spitzpm_device)
                return -ENOMEM;