From patchwork Tue Jun 11 02:37:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 2699701 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id 754683FD4E for ; Tue, 11 Jun 2013 02:39:47 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UmEUM-0001Je-7W; Tue, 11 Jun 2013 02:39:14 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UmEUB-0000aH-DZ; Tue, 11 Jun 2013 02:39:03 +0000 Received: from mail-pd0-f180.google.com ([209.85.192.180]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UmETz-0000Yh-7z for linux-arm-kernel@lists.infradead.org; Tue, 11 Jun 2013 02:38:52 +0000 Received: by mail-pd0-f180.google.com with SMTP id 10so8073787pdi.11 for ; Mon, 10 Jun 2013 19:38:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=8ljUpzyLIbLO7lJmNSzb5BOK+NpeyWe0a+RduZ/sE64=; b=MnlFIphNyX2iVg2U0Dv25Xw9p7Lp2DuEsuaRTOk8hz1FQvfcclmOA1CqUgI81EEbGO 1hy3XX1qgW71KXZmVp6a7OVG8mzTcfodnQGafNKg/1/7H+Xkz+ml41hrjficWSvQ2LWG M5nKWznfduQOdkVozS6oikviSYv2+wdqR033BIMBBwuVPMRnQZASGnAxPP92Z8LuARYd Rjo/m631k8Idh/byTwPAHnuk3BONKnvtxC3boggyYQyMQIaWXqiNMlg6yhCApECRAw/0 8IGfVe9AIeaOG3RKajcGMbOQgL2VKojXR/mDja5JjIe3hz3+PKnou/rWHyqAsnHAatMY dL4A== X-Received: by 10.66.253.195 with SMTP id ac3mr10903399pad.107.1370918309803; Mon, 10 Jun 2013 19:38:29 -0700 (PDT) Received: from localhost.localdomain ([67.198.145.34]) by mx.google.com with ESMTPSA id dg3sm10461723pbc.24.2013.06.10.19.38.25 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Jun 2013 19:38:29 -0700 (PDT) From: Zhangfei Gao To: Wolfram Sang , Dirk Brandewie , baruch@tkos.co.il Subject: [PATCH v3 1/2] i2c: designware: use module_platform_driver Date: Tue, 11 Jun 2013 10:37:09 +0800 Message-Id: <1370918230-24793-2-git-send-email-zhangfei.gao@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1370918230-24793-1-git-send-email-zhangfei.gao@linaro.org> References: <1370918230-24793-1-git-send-email-zhangfei.gao@linaro.org> X-Gm-Message-State: ALoCoQnvT9zySGtNhHjWucbo5Xnb7BjDKhNrzBsgjRd9g8e/KRzqMAU7JYCspS6SU1y27lOTo8jF X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130610_223851_425315_338338FD X-CRM114-Status: GOOD ( 11.55 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.192.180 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Zhangfei Gao , devicetree-discuss@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Instead of use platform_driver_probe, use module_platform_driver To support deferred probing Also subsys_initcall may too early to auto set pinctl Signed-off-by: Zhangfei Gao CC: Baruch Siach --- drivers/i2c/busses/i2c-designware-platdrv.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 35b70a1..41659c0 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -231,6 +231,7 @@ static SIMPLE_DEV_PM_OPS(dw_i2c_dev_pm_ops, dw_i2c_suspend, dw_i2c_resume); MODULE_ALIAS("platform:i2c_designware"); static struct platform_driver dw_i2c_driver = { + .probe = dw_i2c_probe, .remove = dw_i2c_remove, .driver = { .name = "i2c_designware", @@ -240,18 +241,7 @@ static struct platform_driver dw_i2c_driver = { .pm = &dw_i2c_dev_pm_ops, }, }; - -static int __init dw_i2c_init_driver(void) -{ - return platform_driver_probe(&dw_i2c_driver, dw_i2c_probe); -} -subsys_initcall(dw_i2c_init_driver); - -static void __exit dw_i2c_exit_driver(void) -{ - platform_driver_unregister(&dw_i2c_driver); -} -module_exit(dw_i2c_exit_driver); +module_platform_driver(dw_i2c_driver); MODULE_AUTHOR("Baruch Siach "); MODULE_DESCRIPTION("Synopsys DesignWare I2C bus adapter");