From patchwork Tue Apr 23 13:19:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 2477561 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 8326ADF2E5 for ; Tue, 23 Apr 2013 13:21:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756023Ab3DWNVi (ORCPT ); Tue, 23 Apr 2013 09:21:38 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:38729 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756175Ab3DWNVK (ORCPT ); Tue, 23 Apr 2013 09:21:10 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id r3NDKsVs004748; Tue, 23 Apr 2013 08:20:54 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id r3NDKsHA000671; Tue, 23 Apr 2013 08:20:54 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Tue, 23 Apr 2013 08:20:54 -0500 Received: from localhost (uglx0174654.ucm2.emeaucm.ext.ti.com [10.167.145.172]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r3NDKrbQ020866; Tue, 23 Apr 2013 08:20:54 -0500 From: Grygorii Strashko To: Tony Lindgren , Samuel Ortiz CC: Grygorii Strashko , Wolfram Sang , "Ben Dooks (embedded platforms)" , Santosh Shilimkar , , , Subject: [PATCH 1/2] i2c: omap: convert to module_platform_driver() Date: Tue, 23 Apr 2013 16:19:09 +0300 Message-ID: <1366723151-23209-2-git-send-email-grygorii.strashko@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1366723151-23209-1-git-send-email-grygorii.strashko@ti.com> References: <1366723151-23209-1-git-send-email-grygorii.strashko@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The OMAP I2C driver has a relation to pinctrl-single driver. As result, its probe will be deferred during system boot until late init time, because the pinctrl-single is initizalized as moudle/device init time. This, in turn, will delay initialization of all I2C devices (like mfd, I2C regulators and etc.) and cause boot delay (more over, it can broken initialization of drivers which are not ready to use deferred probe mechanism yet, for example DSS). There are no sense to keep OMAP I2C initialization on subsys init layer any more, hence shift it to module/device layer where the i2c <--> pinctrl-single dependency is resolved in drivers/Makefile now. Cc: Wolfram Sang Cc: "Ben Dooks (embedded platforms)" Cc: Santosh Shilimkar Cc: linux-omap@vger.kernel.org Cc: linux-i2c@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Grygorii Strashko --- drivers/i2c/busses/i2c-omap.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 4cc2f05..70d3fed 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -1342,19 +1342,7 @@ static struct platform_driver omap_i2c_driver = { }, }; -/* I2C may be needed to bring up other drivers */ -static int __init -omap_i2c_init_driver(void) -{ - return platform_driver_register(&omap_i2c_driver); -} -subsys_initcall(omap_i2c_init_driver); - -static void __exit omap_i2c_exit_driver(void) -{ - platform_driver_unregister(&omap_i2c_driver); -} -module_exit(omap_i2c_exit_driver); +module_platform_driver(omap_i2c_driver); MODULE_AUTHOR("MontaVista Software, Inc. (and others)"); MODULE_DESCRIPTION("TI OMAP I2C bus adapter");