[PATCH] Revert "spi: omap2-mcspi: convert to module_platform_driver"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This reverts commit 9fdca9dfe093c76fe1ac1a09888ba9679d46996a.

Changing omap2_mcspi_init() from subsys_initcall to device_initcall broke
the display initialization on N900 when all the drivers are compiled
built-in. Display subsystem drivers need a certain initialization order
and having all of them initialize with device_initcall seems to be too
fragile. Without this revert the display init fails and the boot hangs
with the following messages:

[    1.260955] acx565akm spi1.2: invalid display ID
[    1.265899] panel-acx565akm display0: acx_panel_probe panel detect error
[    1.273071] omapdss CORE error: driver probe failed: -19

[...]

[    1.902862] omapfb omapfb: no driver for display: lcd
[    1.908264] omapfb omapfb: cannot find default display

Signed-off-by: Aaro Koskinen <aaro.koskinen@xxxxxx>
---
 drivers/spi/spi-omap2-mcspi.c |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 0c73dd4..8cec17c 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -1289,5 +1289,18 @@ static struct platform_driver omap2_mcspi_driver = {
 	.remove =	__devexit_p(omap2_mcspi_remove),
 };
 
-module_platform_driver(omap2_mcspi_driver);
+
+static int __init omap2_mcspi_init(void)
+{
+	return platform_driver_register(&omap2_mcspi_driver);
+}
+subsys_initcall(omap2_mcspi_init);
+
+static void __exit omap2_mcspi_exit(void)
+{
+	platform_driver_unregister(&omap2_mcspi_driver);
+
+}
+module_exit(omap2_mcspi_exit);
+
 MODULE_LICENSE("GPL");
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux