|
@@ -690,11 +690,23 @@ static struct platform_driver pxa_gpio_driver = {
|
|
|
.id_table = gpio_id_table,
|
|
|
};
|
|
|
|
|
|
-static int __init pxa_gpio_init(void)
|
|
|
+static int __init pxa_gpio_legacy_init(void)
|
|
|
{
|
|
|
+ if (of_have_populated_dt())
|
|
|
+ return 0;
|
|
|
+
|
|
|
return platform_driver_register(&pxa_gpio_driver);
|
|
|
}
|
|
|
-postcore_initcall(pxa_gpio_init);
|
|
|
+postcore_initcall(pxa_gpio_legacy_init);
|
|
|
+
|
|
|
+static int __init pxa_gpio_dt_init(void)
|
|
|
+{
|
|
|
+ if (of_have_populated_dt())
|
|
|
+ return platform_driver_register(&pxa_gpio_driver);
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+device_initcall(pxa_gpio_dt_init);
|
|
|
|
|
|
#ifdef CONFIG_PM
|
|
|
static int pxa_gpio_suspend(void)
|