public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "spi: omap2-mcspi: convert to module_platform_driver"
@ 2012-08-02 23:08 Aaro Koskinen
  2012-08-02 23:54 ` Grant Likely
  0 siblings, 1 reply; 8+ messages in thread
From: Aaro Koskinen @ 2012-08-02 23:08 UTC (permalink / raw)
  To: grant.likely, spi-devel-general, linux-omap; +Cc: balbi, tomi.valkeinen

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@iki.fi>
---
 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-09-21  6:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-02 23:08 [PATCH] Revert "spi: omap2-mcspi: convert to module_platform_driver" Aaro Koskinen
2012-08-02 23:54 ` Grant Likely
2012-08-03  8:05   ` Tomi Valkeinen
2012-08-03  9:45     ` Aaro Koskinen
2012-08-03  9:58       ` Felipe Balbi
2012-08-03 11:50         ` Shubhrajyoti
2012-08-03 12:46           ` Aaro Koskinen
2012-09-21  6:28       ` Jarkko Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox