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: 1268271 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 4E6FB3FC33 for ; Thu, 2 Aug 2012 23:18:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754081Ab2HBXSd (ORCPT ); Thu, 2 Aug 2012 19:18:33 -0400 Received: from filtteri2.pp.htv.fi ([213.243.153.185]:51555 "EHLO filtteri2.pp.htv.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754085Ab2HBXSc (ORCPT ); Thu, 2 Aug 2012 19:18:32 -0400 X-Greylist: delayed 589 seconds by postgrey-1.27 at vger.kernel.org; Thu, 02 Aug 2012 19:18:32 EDT 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 Cc: balbi@ti.com, tomi.valkeinen@ti.com 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 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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");