From patchwork Thu Aug 2 23:08:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 1268281 Return-Path: X-Original-To: patchwork-spi-devel-general@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by patchwork2.kernel.org (Postfix) with ESMTP id 41E8BDF223 for ; Thu, 2 Aug 2012 23:28:46 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Sx4os-0004XM-FQ; Thu, 02 Aug 2012 23:28:42 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Sx4or-0004XG-4J for spi-devel-general@lists.sourceforge.net; Thu, 02 Aug 2012 23:28:41 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of iki.fi designates 213.243.153.185 as permitted sender) client-ip=213.243.153.185; envelope-from=aaro.koskinen@iki.fi; helo=filtteri2.pp.htv.fi; Received: from filtteri2.pp.htv.fi ([213.243.153.185]) by sog-mx-1.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1Sx4on-0006VZ-B1 for spi-devel-general@lists.sourceforge.net; Thu, 02 Aug 2012 23:28:41 +0000 Received: from localhost (localhost [127.0.0.1]) by filtteri2.pp.htv.fi (Postfix) with ESMTP id 3C48019B7A7; Fri, 3 Aug 2012 02:08:42 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at pp.htv.fi Received: from smtp6.welho.com ([213.243.153.40]) by localhost (filtteri2.pp.htv.fi [213.243.153.185]) (amavisd-new, port 10024) with ESMTP id WQV29SXkSScX; Fri, 3 Aug 2012 02:08:41 +0300 (EEST) Received: from blackmetal.bb.dnainternet.fi (212-149-209-232.bb.dnainternet.fi [212.149.209.232]) by smtp6.welho.com (Postfix) with ESMTP id D67905BC003; Fri, 3 Aug 2012 02:08:41 +0300 (EEST) From: Aaro Koskinen To: grant.likely@secretlab.ca, spi-devel-general@lists.sourceforge.net, linux-omap@vger.kernel.org Subject: [PATCH] Revert "spi: omap2-mcspi: convert to module_platform_driver" Date: Fri, 3 Aug 2012 02:08:37 +0300 Message-Id: <1343948917-14760-1-git-send-email-aaro.koskinen@iki.fi> X-Mailer: git-send-email 1.7.2.5 X-Spam-Score: -0.8 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record 0.7 AWL AWL: From: address is in the auto white-list X-Headers-End: 1Sx4on-0006VZ-B1 Cc: tomi.valkeinen@ti.com, balbi@ti.com X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: spi-devel-general-bounces@lists.sourceforge.net 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 --- 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");