]> err.no Git - linux-2.6/commitdiff
[ARM] 5072/1: corgi_pm: don't register devices on non-corgi machines
authorDmitry Baryshkov <dbaryshkov@gmail.com>
Sat, 31 May 2008 15:16:54 +0000 (16:16 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 2 Jun 2008 18:33:33 +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/corgi_pm.c

index 53c4499ebdbcb12ebb105fd0d417141addc911cc..e91c0f26c41210e56fe5d1e996127986ece20192 100644 (file)
@@ -229,6 +229,10 @@ static int __devinit corgipm_init(void)
 {
        int ret;
 
+       if (!machine_is_corgi() && !machine_is_shepherd()
+                       && !machine_is_husky())
+               return -ENODEV;
+
        corgipm_device = platform_device_alloc("sharpsl-pm", -1);
        if (!corgipm_device)
                return -ENOMEM;