ARM: pxa: pxa27x skip default device initialization with DT
authorRobert Jarzmik <robert.jarzmik@free.fr>
Sat, 7 Feb 2015 21:18:34 +0000 (22:18 +0100)
committerRobert Jarzmik <robert.jarzmik@free.fr>
Tue, 12 May 2015 21:26:39 +0000 (23:26 +0200)
When booting via DT, the default PXA devices must not have been probed
before, otherwise the augmented information from the device tree is
ignored.

This is the twin commit of commit 82ce44d104dc ("ARM: pxa3xx: skip
default device initialization when booting via DT").

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Daniel Mack <daniel@zonque.org>
arch/arm/mach-pxa/pxa27x.c

index af423a4..a40f2ac 100644 (file)
@@ -477,8 +477,12 @@ static int __init pxa27x_init(void)
                register_syscore_ops(&pxa2xx_mfp_syscore_ops);
                register_syscore_ops(&pxa2xx_clock_syscore_ops);
 
-               pxa_register_device(&pxa27x_device_gpio, &pxa27x_gpio_info);
-               ret = platform_add_devices(devices, ARRAY_SIZE(devices));
+               if (!of_have_populated_dt()) {
+                       pxa_register_device(&pxa27x_device_gpio,
+                                           &pxa27x_gpio_info);
+                       ret = platform_add_devices(devices,
+                                                  ARRAY_SIZE(devices));
+               }
        }
 
        return ret;